You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
In our application we need to produce different tokens for same client id but different scopes (PKCE flow).
I tried to create 2 different instances of OAuthService when both sharing same configuration but each have different scopes. The token that returned is same token. Is that achievable somehow?
Thanks
The text was updated successfully, but these errors were encountered:
This is not easily achieved with this library. It's set up as a singleton service with a singleton configuration, having either 0 or 1 sets of id/access tokens. Doing multiple instances and multiple access tokens for separate scenario's is in my opinion not a real strong suit (though maybe it can be get to work), so I'd recommend looking elsewhere for that use case.
@eddyuk Hi there. Did you find any solution to your problem. I am also having similar issue. I use PKCE flow but inside my app I have a create signature functionality and during that process second user (not the one that authorized himself before) has to authorize himself. I tired to use fetchTokenUsingPasswordFlow method with different credentails but after successful login my original user becomes the one that just authorized just for the signature... @jeroenheijmans maybe some tip how to get it done?
Sorry, I can only reiterate my previous comment: don't use this library for that scenario. It's in my opinion currently not suited for this situation, even with workarounds and customization.
PS. See also #1280, I'm quite a bit less involved with the library nowadays (just as a heads up).
The solution I have in mind, is eventually to retrieve a token from backend service with different client (for my scenario it is suitable). With the library I only login the working user.
Hi,
In our application we need to produce different tokens for same client id but different scopes (PKCE flow).
I tried to create 2 different instances of OAuthService when both sharing same configuration but each have different scopes. The token that returned is same token. Is that achievable somehow?
Thanks
The text was updated successfully, but these errors were encountered: