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
ok thanks
User (role: guests) missing scope (account)
still
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
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 ( <div>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.
it is working though
but
let me change that
still those same error come up
same erros
did you add the use client
yes
on the top of the file
did you rebuild the app?
yes
the error is a mess rather i will create a oauth session from next auth than store the userData on db by passing credentials
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...