-
Notifications
You must be signed in to change notification settings - Fork 71
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
Include redirect_uri query parameter in silent refresh? #581
Comments
See SigninSilentArgs in UserManager:
|
Thank you. If I understand your response correctly, that means, that I have to call signinSilent myself, passing the redirect_url as parameter in the SigninSilentArgs object. |
Yes, that was my idea, i just looked at the oidc-client-ts code, but your code path the args parameter is not taken into account yet, as such that will also not work yet: public async signinSilent(args: SigninSilentArgs = {}): Promise<User | null> {
const logger = this._logger.create("signinSilent");
const {
silentRequestTimeoutInSeconds,
...requestArgs
} = args;
// first determine if we have a refresh token, or need to use iframe
let user = await this._loadUser();
if (user?.refresh_token) {
logger.debug("using refresh token");
const state = new RefreshState(user as Required<User>);
return await this._useRefreshToken(state);
} You would need to provide a merge request in oidc-client-ts to add this feature.
I am not using the "the Refresh Token grant type". |
I am trying to use react-oidc-context to login with Azure AD B2C.
The login works as expected, but I cannot get the silent refresh to work.
Before the access token expires, the library sends a request to the auth endpoint including the refresh_token.
But Azure AD B2C also requires that you include the redirect_uri again in the query parameters.
I get the following error response: AADB2C90083: The request is missing required parameter: redirect_uri.
Is there a way I can control, that this parameter gets included in the silent refresh call?
I looked through the documentation and couldn't find a suitable configuration setting, that would take care of that.
I tried setting the extraQueryParams property in the oidcConfig object, but that will lead to the redirect_uri parameter ending up twice in the initial login request and still isn't included in the silent refresh call.
If it is not possible to adapt the silent refresh in that way. What would be my options implementing the token refresh myself?
The text was updated successfully, but these errors were encountered: