webflow / js-webflow-api

Node.js SDK for the Webflow Data API
https://www.npmjs.com/package/webflow-api
286 stars 93 forks source link

Authorization using auth0 : Add a support for openid in the allowed scope . #103

Open vipinWednesday opened 10 months ago

vipinWednesday commented 10 months ago

I am trying to authorise my react app with the webflow app , using auth0-react .

This library sends a 'openid' as a scope by default, including the customised scope. Which currently is not supported in the following list of scopes, which makes the flow incomplete on my app with this error.

https://docs.developers.webflow.com/reference/authorization

Request Url
https://webflow.com/oauth/authorize?
client_id={{client_id}}
scope=openid assets:read sites:read users:read authorized_user:read
response_type=code
response_mode=query
state={{state}}
nonce={{nonce}}
code_challenge={code_challeng}}
code_challenge_method: S256
auth0Client={{auth0Client}}

After logging in at Webflow.

{appUrl}}/loginRedirect?error=invalid_scope&error_description=The following scopes are invalid:openid&state={{state}}
error: invalid_scope
error_description: The following scopes are invalid: openid

The expected flow should work withopenid as a scope .

Any help around this will be appreciated.