Hello.
I’m new to Auth0 and I’m in trouble now.
Fronted: Nuxt3.12.4 / @auth0 /auth0-vue v2.3.3
Backend: Laravel9.52.16 / auth0/login
Auth0 >> Applications >> Application Properties >> Application Type == Singe Page Application
The frontend seem to be working well.
After I login, “https://my-domain/oauth/token ” is called to obtain an access_token.
However, I realized that the paylode of my access_token is empty.
What should I do to fix it?
I would be grateful if someone could kindly help me.
If more informations are needed, please let me know.
tyf
August 9, 2024, 3:07am
3
Hey there @t.fukao welcome to the community!
It looks like you are receiving an opaque token which happens when you fail to pass an audience in the authorize request - In your case, you can pass the audience
param using the SDK:
# Examples using auth0-vue
- [Add login to your application](#add-login-to-your-application)
- [Display the user profile](#display-the-user-profile)
- [Add logout to your application](#add-logout-to-your-application)
- [Calling an API](#calling-an-api)
- [Accessing ID Token claims](#accessing-id-token-claims)
- [Error Handling](#error-handling)
- [Protecting a route](#protecting-a-route)
- [Protecting a route when using multiple Vue applications](#protecting-a-route-when-using-multiple-vue-applications)
- [Accessing Auth0Client outside of a component](#accessing-auth0client-outside-of-a-component)
- [Organizations](#organizations)
## Add login to your application
In order to add login to your application you can use the `loginWithRedirect` function that is exposed on the return value of `useAuth0`, which you can access in your component's `setup` function.
```html
<script>
import { useAuth0 } from '@auth0/auth0-vue';
This file has been truncated. show original
1 Like
Hello @tyf .
By adding ‘audience’ param to the SDK, this issue has been resolved.
Thank you for your help!
1 Like
tyf
August 9, 2024, 2:02pm
5
Awesome! Thanks for confirming
1 Like
system
Closed
August 23, 2024, 2:02pm
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.