There are a couple of things you need to do:
- Correct, for a SPA, you would use the Implicit Grant flow.
- You need to configure the API in Auth0. This is the Auth0 mapping to your API, similar to how you setup a Client in Auth0 for your SPA.
https://manage.auth0.com/#/apis - The
identifier
of the API you setup in step 2 needs to be passed as anaudience
parameter when executing the authentication flow. This will result in anaccess_token
returned, along with theid_token
. Theaccess_token
is the one you will pass to your API. - Your API middleware will validate the token.