Auth0 Home Blog Docs

Skip consent page with Auth0 SPA SDK

I’m trying out the new @auth0/auth0-spa-js sdk package with a react app. Whenever I try to login to my app, I keep getting directed to the Consent page. I have an API running with the “Allow Skipping User Consent” setting enabled, but it doesn’t seem to work. The current auth0 application I’m using has the “SINGLE PAGE APPLICATION” type so I’m not sure if it’s hitting the right endpoint,

This is what I have in my index.js

<Auth0Provider
        domain={process.env.REACT_APP_AUTH0_DOMAIN}
        client_id={process.env.REACT_APP_AUTH0_CLIENT_ID}
        redirect_uri={process.env.REACT_APP_AUTH0_REDIRECT_PATH}
        responseType={'token'}
        scope={'openid'}
        audience={process.env.REACT_APP_AUTH0_API_IDENTIFIER}
        onRedirectCallback={onRedirectCallback}
  > 

Am I doing something wrong here?

HI there @jeff-li, welcome to the Auth0 Community!

Are you seeing any errors in the console or within your Auth0 dashboard? Your index.js looks correct out the gate. While the quickstart below is based for vanilla Javascript, it could be worth giving it a quick look just in case. Thanks!