How do I implement "redirect to where it come" mode ?
See original GitHub issuefrom http://angularapp.com/abc/def
, redirect to authentication server http://myauth.com/<authorization_endpoint>
after login redirect back to http://angularapp.com/spa-callbak
I hope that this url have previous url as querystring like http://angularapp.com/spa-callbak?returnurl=/abc/def
so I can perform a redirect.
Am I use this lib incorrectly ? I have flow issues for now:
- url
/spa-callback
is a compontent that have “this.router.navigate([”/“]);” insidengOnInit()
but only get 50% change to automatice goto~/
- a component show’s user’s name , but some time there no value
my authentication server is IdentityServer4, to load user data i put this line in AppModule
this.oauthService.configure(authConfig);
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
this.oauthService.loadDiscoveryDocumentAndLogin()
.then(x => {
if (x) {
this.oauthService.loadUserProfile();
}
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Redirections in HTTP - MDN Web Docs - Mozilla
In HTTP, redirection is triggered by a server sending a special redirect response to a request. Redirect responses have status codes that start ......
Read more >HTTP redirect codes for SEO explained - ContentKing
The HTTP redirect code, redirect for short, is a way to forward visitors and search engines from one URL to another. Redirects are...
Read more >How to redirect sites to IE Mode in Edge browser - YouTube
Hi Guys,In this Video i have tried to explain about How to redirect sites to IE Mode in Edge browser step by step...
Read more >Deploy Folder Redirection with Offline Files - Microsoft Learn
Enter the names of the users or groups to which you want to deploy Folder Redirection, select OK, and then select OK again....
Read more >How to Set Up Redirections? - Rank Math
HTTP redirects are incredibly important in SEO & UX. When you visit a URL with a redirection, your browser automatically jumps to a...
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
@jeroenheijmans I’m sorry for my bad english and Happy Mid-autumn festival 😄
I will try again with your solution after the holiday . and meantime I will close this issue.
@jeroenheijmans I tryed your solution , I have a suggestion about
loadDiscoveryDocumentAndLogin()
, I hope that this method save the url by default , andthis is my final code :