-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Allow to clear the user session without redirect #42
Comments
Removing user from storage will not log him out from the identity provider (it will be only on the app level). |
That's exactly what I want, we can force re-authentication even when the session is still active. See here: Force Reauthentication in OIDC |
Out of curiosity: why would you want to do that ? Like I answered in #30:
This will do exactly what you want: user opens the app, logs in, closes the app, reopens the app and is now logged out (forcing him to click on login again), but he was not logged out from the IDP so popup comes and goes, and user is logged in again. You can also couple that with |
What I want is that - on mobile - every time the app opens we should start from a clean state (no previous auth session), now I'm not able to force signout from the identity provider. Still, at least I could clear the local user session, and force the user to re-authenticate (even if he didn't log out from the IDP) as I mentioned above.
But another main point is that by using the |
So yes, |
Regarding the full control over OidcUserManager, I get your point and I'm opened to discuss it, but only on a per case basis and only if it makes sense. This library was made with 3 things in mind:
|
|
Glad to see you got it working ;-) You can also import and use isNativeMobile directly from the lib (which will make sure your app is either a Capacitor app or Cordova app) |
Description
I would like to force the user to re-login on app start even though the previous session has not expired yet.
Right now the only way to log out the user is by calling
logout
fromAuthService
which is doing a redirect in a browser window, but that's not what I want to do when the user opens the app, instead, I would like to clear the session from storage so the user must re-enter his credentials.This will also resolve point 2 here
Proposed solution
Make
removeUser
fromOIDCAuthManager
public as well for ngx-auth.Alternatives considered
No response
The text was updated successfully, but these errors were encountered: