Redirect path in logout
See original GitHub issueIssue and Steps to Reproduce
logout doesn’t expose a callback uri option:
export declare const useOidc: (configurationName?: string) => {
login: (callbackPath?: any) => any;
logout: () => any;
isLogged: boolean;
};
export declare const useOidcAccessToken: (configurationName?: string) => any;
export declare const useOidcIdToken: (configurationName?: string) => any;
//# sourceMappingURL=ReactOidc.d.ts.map
Versions
4.2.3
Screenshots
Expected
login: (callbackPath?: any) => any;
logout: (callbackPath?: string) => any;
Is there something else than appending the callbackPath to the logout endpoint that i’m missing ?
in oidc.ts line 434
async logoutAsync() { <--- HERE
const oidcServerConfiguration = await this.initAsync(this.configuration.authority);
// TODO implement real logout
await this.destroyAsync();
window.location.href = oidcServerConfiguration.endSessionEndpoint; <-- Add redirect
}
Actual
Additional Details
I can open a PR for that If you want.
- Installed packages:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:15 (12 by maintainers)
Top Results From Across the Web
Redirect Users After Logout - Auth0
You can redirect users to a specific URL after they logout. You will need to register the redirect URL in your tenant or...
Read more >How to set laravel 5.3 logout redirect path? - Stack Overflow
you can go to vendor\laravel\framework\src\Illuminate\Foundation\Auth\AuthenticatesUsers.php in function logout change return redirect('/'); to your route ...
Read more >Custom Redirect URL after login and logout - Plugins
Navigate to the Login/Logout Settings tab. · Enter the URL you want the users to be redirected to when they logout in the...
Read more >How to modify the logout redirect path - Stefan Bauer
Until now, there is only the possibility to modify the login redirect path. I show you how you can easily modify the redirect...
Read more >Post logout redirect url - should redirect to login page instead ...
When I give the below URL, it logs me out and says "you signed out of your account" but have trouble redirecting it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yearh, I will try to email the team. I am thinking to take the owership of it and ask openid team to certify their own library.
For example: axa-fr/appauthjs
I mean. For now its a 3 lines quick workaround:
oidc/vanilla/oidc.ts
and
oidc/ReactOidc.tsx
An then set the call back path when you “logout” in your app.