drbh commited on
Commit
c3744db
·
1 Parent(s): c202a37

fix: update scopes

Browse files
app/lib/huggingface-oauth.server.ts CHANGED
@@ -45,7 +45,7 @@ export class HuggingFaceOAuthService {
45
  let authUrl = new URL(`${HF_OAUTH_BASE_URL}/authorize`);
46
  authUrl.searchParams.set('client_id', this.clientId);
47
  authUrl.searchParams.set('response_type', 'code');
48
- authUrl.searchParams.set('scope', 'profile'); // Explicitly use 'profile' as required by HF
49
  authUrl.searchParams.set('redirect_uri', this.redirectUri);
50
  authUrl.searchParams.set('state', state);
51
  authUrl.searchParams.set('code_challenge', codeChallenge);
 
45
  let authUrl = new URL(`${HF_OAUTH_BASE_URL}/authorize`);
46
  authUrl.searchParams.set('client_id', this.clientId);
47
  authUrl.searchParams.set('response_type', 'code');
48
+ authUrl.searchParams.set("scope", "openid read-repos profile jobs-api"); // Explicitly use 'profile' as required by HF
49
  authUrl.searchParams.set('redirect_uri', this.redirectUri);
50
  authUrl.searchParams.set('state', state);
51
  authUrl.searchParams.set('code_challenge', codeChallenge);