Problem
Currently, is possible to login with e-mail address or the username; However, Sen2Cube.at uses internally always the username, e.g. to create internal directories for output locations / filtering inferences etc.
If the e-mail address is used to login, the "owner" attribute of the inference table will have it as value but it will be treated as a different user. For instance, the inference will then not be accessible anymore from the Web frontend or other parts of the system.
Suggestion
After successful login, make an (authenticated) request to the Keycloak userinfo endpoint ({{server}}/auth/realms/{{realm}}/protocol/openid-connect/userinfo) to obtain the preferred_username value for the owner attribute.
Problem
Currently, is possible to login with e-mail address or the username; However, Sen2Cube.at uses internally always the username, e.g. to create internal directories for output locations / filtering inferences etc.
If the e-mail address is used to login, the "owner" attribute of the inference table will have it as value but it will be treated as a different user. For instance, the inference will then not be accessible anymore from the Web frontend or other parts of the system.
Suggestion
After successful login, make an (authenticated) request to the Keycloak userinfo endpoint ({{server}}/auth/realms/{{realm}}/protocol/openid-connect/userinfo) to obtain the preferred_username value for the owner attribute.