With the old WebAuth sdk, the access token was a large-ish JWT that included a “sub” parameter, so I could, for example, decode it on my Django API server and use middleware to look up a user record and perform fine-grained app level permissioning in my GraphQL resolvers, etc.
I’m having a similar issue getting the spa sdk to return a jwt formatted access token. However, I am passing the audience. Are there any code samples available?
You are likely missing the scope=openid parameter. That should return a richer JWT. The shorter access_token is useful to retrieve the user profile. (which would return the sub property too, but would require a new network call)
Your API should always validate the integrity of the token (e.g. signature, expiration, etc).