Closed FreekVR closed 4 years ago
Yes, this issue is already tracked in #58.
To make a workaround for the platform is OK, but we should keep the API compatible with other platforms, or find a more common way to handle it.
Contributions & discussions welcome!
Yes, this is exactly the problem I am facing now. If there is a "#" on the page url, the authorization will fail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What problem does the feature solve?
Having to add all the redirect URLs manually to gitlab. https://gitlab.com/gitlab-org/gitlab/issues/23054
Proposed solution
Instead of redirecting the oauth to the page you're on, perhaps we could allow the configuration of a static location. Eg. you can set
{ oauthRedirect: https://localhost:8080 }
and it will pass along this to gitlab as the redirect URL. The user would of course not end up on the page they started on, but hopefully the oauth redirect only happens a few times when you need to re-authenticate? Otherwise, at least it would be working, it's not really feasible to add all the different dynamic URLs for a vuepress blog application :)Alternative solutions
Perhaps alternatively, we could implement a
/login
route in the vue application which would serve as the oauth redirect, and the application would set some localStorage property or something before sending the user off to gitlab, and then use that property upon being redirected back to/login
to point the user to where they clicked the login button in the first place.