Chrome extension | openId | insufficient_scope

Hi I’m trying to implement twitch login into my Chrome extension

I’ve found and followed this tutorial (published Oct , 2020)

When It comes to the login I’m forwarding the user to the following url - (Human readable before JSON.stringify and encoding the URI strings for readability)

https://id.twitch.tv/oauth2/authorize
?client_id=
&redirect_uri=https://.chromiumapp.org/
&response_type=token id_token
&scope=openid
&claims=id_token: { email: null, email_verified: null }
&state=meet88ldumv8vbq
&nonce=iufn7b7ugm4v4mrvzfafj

This pops up the with login to enter username and password,
But on entering if doesn’t take me the page where the user accepts the policy but straight to the
“You are about to leave Twitch. Twitch has no control over the content or security of …” and clicking continue returns the below to the Chrome extension

https://.chromiumapp.org/?error=insufficient_scope&error_description=The+scope+of+the+authorization+is+insufficient+for+the+id+token+claims+requested&state=meet88ldumv8vbq

The key bit being
error=insufficient_scope
error_description=The scope of the authorization is insufficient for the id token claims requested

Any help anyone could offer would be appreciated

Found what the isssue was.

Even thought the docs say :
Note : The email and email_verified claims will soon be gated by the user:read:email scope that must be included on the authorization request.

Looks like they pushed the update without updating the doc

So if anyone else has this problem and finds this post you need to add ‘user:read:email’ to you scope parameters

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.