-
Notifications
You must be signed in to change notification settings - Fork 42
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
Browser/App: Restore session without silent login and redirect #3443
Comments
I think one would have to keep in mind https://www.ietf.org/archive/id/draft-ietf-oauth-security-topics-25.html#name-refresh-token-protection |
In the case of hybrid apps I would argue that storing refresh tokens is useful and secure. But the issue that the access tokens can not be stored is quite problematic. |
Hi @Maximvdw, and thanks for reaching out . You should already be able to get a refresh token in the browser, as it is currently the mechanism used to extend an open session beyond the (purposefully short) lifetime of the issued Access Token. If you log in using In For this reason, the |
In a Capacitor app - both will break the UX flow of the application. I understand your concern with localStorage. But for a mobile application using a webview, this security risk does not exist. In addition, browser sessions currently support the So removing the feature of storing/accessing refresh tokens simply because the assumption is that As an FYI: in capacitor I use https://github.com/martinkasa/capacitor-secure-storage-plugin to secure the storage of sessions. Currently I had to perform a large workaround where the complete "handleRedirect" has to be rewritten, since the API offers no other way to intervene in the storage of access tokens (since they are used to create a fetch method and are then disposed). As for the refresh tokens, this is currently not (yet) handled. In additon, most internal API's are not exported so doing this workaround is in fact not easy. TL;DR: In a sense, a hybrid 'browser' application is similar to a self-contained and secure nodejs application. Other than a 'browser' application that runs on the Web with the security concerns involved. With the use of |
Hey,
In NodeJS there is the possibility for an application to request a refresh token that can be stored on the server. I am developing a hybrid mobile application that will run in a secure context and I use the browser authentication to do so.
Everything works fine, I have a clientId: https://sembeacon.org/id.jsonld that could request a refresh_token, etc...
However, I want to disable the silent login that redirects the user away to the Authorization server whenever they reopen the app,
since other than a browser - this is a much more visible process in a mobile application. I already have my insecure and secure storage configured for localStorage - but this does not seem to work.
From what I see, the client authentication uses the following authentication flow: https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth while the node implementation has a refresh token flow. There does not seem to be a possibility to change this flow since the login flow is defined in:
solid-client-authn-js/packages/browser/src/dependencies.ts
Lines 81 to 86 in 4902d20
which can not be changed or configured before it is loaded by a session.
Is it possible to somehow to either:
clientAuthentication
object in each session, to replace the login flow with something that has theRefreshTokenOidcHandler
in anAggregateOidcHandler
. However, I do not know if this will work and it also feels like a solution for an issue that should not be there. A configuration to use refresh tokens would be useful or at least a solution to persist the access token and id_token for page refresh.Best,
Maxim
The text was updated successfully, but these errors were encountered: