React JS SPA app adding duplicate context path during Auth server redirect call

Viewed 19

I have implemented an SPA application with a domain URL "https://mydomainname.com/context-path" using class based component. The whole qualified URL("https://mydomainname.com/context-path") is my base URL for SPA home page.

I have also implemented UI auth flow to validate and generate the access token from OAuth Server.

Whenever users click on the login button from SPA home page, call goes to my auth provider which returns login page for user. After user supply the credentials and submit the login form, call goes to auth server for validating the credentials and then generate the access token and redirect to SPA home page(https://mydomainname.com/context-path)

During redirect call, SPA application gets refreshed and the router code is trying to append context path in my base url which gets converted to https://mydomainname.com/context-path/**context-path**

I have implemented the context path addition logic in the router

Question: How can I avoid adding additional context path during auth server redirection to SPA home page?

Regards Debangshu

0 Answers
Related