react-simple-oauth2-login
react-simple-oauth2-login copied to clipboard
How to specify scopes
How do I include scopes in my configuration please.
Hello! Thanks for your question and sorry for the delayed answer. It's indicated under the Props section of the documentation: scope
Basically you have to give this scope
prop the string containing relevant scope(s), separated by spaces. Example for Spotify (derived from the doc's example):
<OAuth2Login
scope="user-top-read user-follow-read"
authorizationUrl="https://accounts.spotify.com/authorize"
responseType="token"
clientId="9822046hvr4lnhi7g07grihpefahy5jb"
redirectUri="http://localhost:3000/oauth-callback"
onSuccess={onSuccess}
onFailure={onFailure} />
Please let me know if this helped!