OAuth2.0/OIDC implementation #161
Replies: 3 comments 5 replies
-
Hi @EnricoBilla, For this feature, I was considering finding an OAuth2.0/OIDC provider that has a docker container image to run with the whole stack, that would make the implementation easier. I am also leaning toward having the server as the single source of truth, the client app should be dumb and has to ask the server for every request (For the current version, it is checking the access token for every request). The OAuth2.0/OIDC should be the service to provide the functionality that we need, not storing any data from the app. It keeps the app simple, easier to maintain, and presents options to the user to opt in or not. |
Beta Was this translation helpful? Give feedback.
-
Little update to this, I didn't have much time in the last days but I managed to write almost all the necessary code for the backend to work. For reference, I'm working on https://github.com/EnricoBilla/immich/tree/dev/oauth2-validation |
Beta Was this translation helpful? Give feedback.
-
Hi!
I think that the proposal in #33 to implement OAuth2.0/OIDC is great, for this reason I started looking into it a bit more but before committing any code I'd like to discuss the implementation with you.
Backend-wise I was thinking to add the client id, secret and discovery endpoint as environment variables. The discovery endpoint should be exposed through the API to the mobile application to know where to perform the authentication.
Every API call then should verify with the auth provider that the token is still valid for the user.
App-wise it would require a little bit more work to do, but I found the
flutter_appauth
package that should abstract the authentication login client side.I'd like to get some feedback from you! Hope to be able to implement it 😃
Beta Was this translation helpful? Give feedback.
All reactions