Closed NasaRocket closed 1 month ago
for @coyotte508 when he's back! or cc @Kakulukian too maybe
Hello, we have some examples here: https://huggingface.co/docs/hub/spaces-oauth#examples
And the @huggingface/hub
javascript library has support for oauth: https://github.com/huggingface/huggingface.js/tree/main/packages/hub#oauth-login. You can check https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/oauth-login-url.ts and https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/oauth-handle-redirect.ts for source implementation.
We basically follow openid connect standard, any open id client/oauth client should be able to log in via oauth. And on the backend we made sure to always send explicit error messages.
can we close this @NasaRocket?
ok
Doc request
I am trying to implement a third-party login using Hugging Face's OAuth. Currently, the frontend is only able to obtain the values code=xxxx&state=xxxx. However, the documentation does not specify the subsequent steps needed to complete the authentication process. Could you please provide clarification on how to proceed after receiving these values? Here is the documentation link for reference: Hugging Face OAuth Documentation.
Additional context
It would be greatly helpful to have a step-by-step guide or example code on how to exchange the code for an access token and any other necessary steps to finalize the login process. Thank you!