-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: optimize github/gitee token process #919
feat: optimize github/gitee token process #919
Conversation
Signed-off-by: frank-zsy <[email protected]>
Currently, we only has a very basic version which will log the information into console but all is good now. @wangyantong2000 Could you keep working on this PR and make it available for production? |
I also added the Gitee token process. Gitee is a little bit different than GitHub, GitHub OAuth App will return a permanent token without expire date ( maybe, as far as I know). But Gitee will return an object with token and The doc is here: https://gitee.com/api/v5/oauth_doc#/ |
Signed-off-by: frank-zsy <[email protected]>
74af854
to
d152f39
Compare
Sorry, after updating the Edge browser, |
Signed-off-by: frank-zsy <[email protected]>
Signed-off-by: frank-zsy <[email protected]>
The |
Signed-off-by: frank-zsy <[email protected]>
@wangyantong2000 I think I've finished all the functionality of new token retrieval procedure. You can test it in your local env and report any bug you find, and feel free to optimize the code as you like. And the PR will not be ready until hypercrx.cn domain is valid. |
@Xsy41 Could you also test this functionality? |
Good work! I think it's a great feature. |
Whether user consent is required for each binding?There is no problem in the implementation of the function. |
No, the authorization action will be only required for the first time. Actually this action means user authorizes the HyperCRX OAuth App to access his account. So if the user finish the authorization in first time, he will not need to consent again even in a different device. So after you unbind the account, re-bind account is totally automated and there will not be a pop-up page. However there will be pop-up page in following situations:
Except the above situations, if users keep login on GitHub/Gitee, the bind action will be fully automated after the first time. |
Signed-off-by: frank-zsy <[email protected]>
This setup sounds user-friendly, especially with automated re-binding in most cases. Thanks for your thorough response! |
Signed-off-by: frank-zsy <[email protected]>
The hypercrx.cn domain has been ready and already changed the online URL, this PR is ready for merge now. @wangyantong2000 |
Signed-off-by: frank-zsy <[email protected]>
OK |
Brief Information
This pull request is in the type of (more info about types):
Related issues (all available keywords):
Details
This PR will optimize the GitHub token retrieve process. Originally, we requires users to generate the token manually and set into the HyperCRX settings, this is not friendly enough for some users especially non-tech users.
Now, we are using HyperCRX GitHub OAuth App to do this, user only need to click the button and HyperCRX will redirect to GitHub OAuth page for users to authorize HyperCRX App to get personal token automatically. Although this requires an OAuth server to get the token and get back to users, the process is much more easy for users.
Checklist
Others