Back

[SOLVED] User (role: guests) missing scope (account)

  • 0
  • Accounts
  • Web
  • Cloud
D5
11 Aug, 2023, 09:46

Or just not use SSR if it's not needed

TL;DR
Title: [SOLVED] User (role: guests) missing scope (account) Summary: The user was experiencing an issue with the magic URL for Flutter. They received a "missing a proper redirect URL" error. It was suggested to manually extract the session cookie and handle the magic URL flow server-side. The user also asked about a workaround for not using a client-side email confirmation endpoint. It was explained that the Appwrite client SDKs work using cookies and local storage, which are not available server-side. The user confirmed that they were trying to get the login session on the client-side after server-side login trigger. The issue
manazo
11 Aug, 2023, 09:48

i have no problem with using CSR. but as i mentioned above, it's throwing the same error even on CSR

D5
11 Aug, 2023, 09:50

You mean missing scope...

manazo
11 Aug, 2023, 09:55

yes. the exact same error, but in the browser console

D5
11 Aug, 2023, 10:19

But is this after login in? Everything is being triggered client side?

manazo
11 Aug, 2023, 10:20

the login was triggered on the server side with magic url. and i'm trying to get the login session in the client side

Drake
12 Aug, 2023, 15:04

Did you complete the magic URL server side or client side?

manazo
12 Aug, 2023, 15:14

The magic URL was completed on the server side. and after some digging, I kinda get that a server-side login session won't work on the client-side cause Appwrite is storing the server-side session as Node Fetch and a client-side session will be stored based on the browser. but what I'm mostly confused about is, why it's not working when both the magic URL and account.get() is on the server-side

Drake
12 Aug, 2023, 15:19

The Appwrite client sdks work using cookies and local storage. Those are not available server side so the session isn't persisted and used in future requests

manazo
12 Aug, 2023, 15:24

okay, sounds logical. but what should be the workaround for this if I don't wanna make my email confirmation endpoint client-side? cause magic URL surely not available on the server sdk

Drake
12 Aug, 2023, 15:25

Manually finish the magic URL flow and do the same as manually creating an email session

manazo
12 Aug, 2023, 15:27

how can i finish the magic URL flow manually?

manazo
12 Aug, 2023, 15:27

didn't get what you mean

Drake
12 Aug, 2023, 15:28

Make the API call manually

manazo
12 Aug, 2023, 15:31

on the client-side?

Drake
12 Aug, 2023, 15:32

No you said you wanted to handle it server side

manazo
12 Aug, 2023, 15:34

okay, do you mean to literally hit the PUT endpoint to update the magic url session instead of using the updateMagicURLSession function?

manazo
12 Aug, 2023, 15:44

I'm not sure what difference it'll make. it would be great if u can help me understand that

Drake
12 Aug, 2023, 16:06

The point is to manually extract the session cookie like the repo does

manazo
15 Aug, 2023, 19:15

[CLOSED] User (role: guests) missing scope (account)

manazo
15 Aug, 2023, 19:15

[SOLVED] User (role: guests) missing scope (account)

alex2341355
5 Sep, 2023, 09:22

Hello. Please help. I cant use magic url for flutter. I get link on mail, but when i hit it i get your Magic url login flow is missing a propper riderect URL. Please check the Magic URL docs and send request for new session with a valid redirect URl.

alex2341355
5 Sep, 2023, 09:22

i use cloud

Drake
5 Sep, 2023, 18:38

please create a new <#1072905050399191082> post instead of posting in an old thread

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more