I have a React SPA and a Python Flask API stack going. On my Auth0 config, I have created an SPA application and a also an API application.
I am using the code in the React Quickstart tutorial as a template and am able to login to my React SPA. But when I execute getTokenSilently in order to pass the tokens to my Flask API, the tokens are not JWT-compliant and thus being rejected by Flask.
Reading these forums, I understand I need to pass in the audience and scope. Here are my questions:
Are the audience and scope passed in the initial SPA authentication? I am using loginWithRedirect for my initial authentication. and have tried passing audiencce/scope in it but that is is failing. Do I need to modify the boilerplate code from Quickstart in order to enable loginWithRedirect to use audience/scope?
Are the audience/scope passed in GetTokenSilently also in addition to the initial loginWithRedirect?
I have gone through all the articles but am simply unable to find an updated document that lays out this architecture that is relevant in the the auth0 SPA framework.