meteorlxy / vssue

:mailbox: A Vue-powered Issue-based Comment Plugin
https://vssue.js.org
MIT License
769 stars 105 forks source link

[Feature Request] Add static oauth redirect option for gitlab workaround #76

Closed FreekVR closed 4 years ago

FreekVR commented 4 years ago

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.

meteorlxy commented 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!

hieastz commented 4 years ago

Yes, this is exactly the problem I am facing now. If there is a "#" on the page url, the authorization will fail.

stale[bot] commented 4 years ago

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.