-
Notifications
You must be signed in to change notification settings - Fork 232
"AuthSdkError: The app should not attempt to call authorize API on callback." when passing my own AuthService
instance
#863
Comments
@sarahdayan Thanks for the report. This error is most commonly called by router config. The most common cause is route logic which is meant for a non-callback route running on the callback. For example a route with path |
Hi, @aarongranick-okta. Could you please advise how this can be fixed in angular application. I'm getting the same error when trying to get accessToken.
Part of my
I have now any other components and routes, everything is within app (root path). |
@ilgiznurgaliev a few questions which will help us solve this issue:
|
@ilgiznurgaliev Reading your question closely I see you say that "everything is within app (root path)". So the problem is probably calling
|
Closing this issue. |
I'm submitting this issue for the package(s):
I'm submitting a:
Current behavior
I'm willing to ensure that both
idToken
andaccessToken
are still fresh to determine that a user is authenticated. As recommended here, I'm doing so by implementing my ownAuthService
instance and passing it down to my<Security>
component:It works and I successfully sign in, but I get an error printed in the callback phase (when hitting
/implicit/callback
):My callback route is using the
LoginCallback
component provided by the SDK, nothing custom, so I'm unsure why I'm getting this error. I used to have all the options from myAuthService
instance passed as props in<Security>
, I only moved them into theAuthService
constructor.Expected behavior
I would expect no error to show up, and the behavior should be the same when passing an instance vs. when passing each option as a prop.
Minimal reproduction of the problem with instructions
AuthService
instance and pass it to<Security>
component (code above).Extra information about the use case/user story you are trying to implement
I'm willing to implement
isAuthenticated
myself to check whetheridToken
andaccessToken
are fresh, as recommended here.Environment
node -v
): 14.2.0The text was updated successfully, but these errors were encountered: