Can only access the nuxt-sidebase useAuth() in the setup script, not the methods or functions
I havent had much luck with reaching out to sidebase about this issue.
I was able to implement sso login and everything with the nuxt-sidebase plugin but the issues start when you try to use the data...
For example:
If I use
I get the following error:
But if I do
The page loads and the text properly displays "data" when I do
{{data}}
but when I try to access the data from a function or method it either gives me the wrong object or says it is not defined.
See attached the console output for what actually prints.
What it is supposed to say is:
1 Reply
It looks like you're calling a composable outside the setup function in the first code snippet. I'm not familiar with the options API but I think if you're going to use it you can't put
useAuth
outside the setup function