Rank 2: Process
how to disable it?
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
how to disable it?
what i do, is kind of a hacky way to do it. I add a 'use client' to the top of the file, which converts the whole component into a client component
it's best if you google and check what works best for your use case
Rank 2: Process
ok thanks
Rank 2: Process
User (role: guests) missing scope (account)
Rank 2: Process
still
Rank 2: Process
XHRGET
https://cloud.appwrite.io/v1/account
[HTTP/2 401 Unauthorized 168ms]
XHRGET
https://cloud.appwrite.io/v1/account
[HTTP/2 401 Unauthorized 169ms]
AppwriteException: User (role: guests) missing scope (account) AppwriteException sdk.js:82 call sdk.js:391 fulfilled sdk.js:22 promise callback*step sdk.js:24 fulfilled sdk.js:22 promise callback*step sdk.js:24 __awaiter sdk.js:25 __awaiter sdk.js:21 call sdk.js:341 get sdk.js:427 __awaiter sdk.js:25 __awaiter sdk.js:21 get sdk.js:423 fetchUser Home.js:19 Home Home.js:27 React 8 workLoop scheduler.development.js:266 flushWork scheduler.development.js:239 performWorkUntilDeadline scheduler.development.js:533 EventHandlerNonNull* scheduler.development.js:571 <anonymous> scheduler.development.js:633 NextJS 4 <anonymous> index.js:6 js NextJS Home.js:22:14 AppwriteException: User (role: guests) missing scope (account)
can you please use backtick to make it more readable?
` symbol
@sugam-pokhrel please share the code where you implement OAuth sign in
Rank 2: Process
Rank 2: Process
code for signin in `
export const Signin = () => {
const googleAuth= async(e)=>{
e.preventDefault();
await account.createOAuth2Session('google','http://localhost:3000/home',"http://localhost:3000/login")
}
return (
Signin
<button onClick={(e)=>{googleAuth(e)}}>Gauth</button>
</div>
)
}
`
why are you using e.preventDefault()
OAuth in appwrite opens a new window/tab for the login.
Rank 2: Process
it is working though
Rank 2: Process
but
Rank 2: Process
let me change that
Rank 2: Process
still those same error come up
Rank 2: Process
same erros
did you add the use client
Rank 2: Process
yes
Rank 2: Process
on the top of the file
did you rebuild the app?
Rank 2: Process
yes
Rank 2: Process
the error is a mess rather i will create a oauth session from next auth than store the userData on db by passing credentials