Back

Is it possible to create session for user via console?

  • 0
  • Accounts
Vedsaga
18 Mar, 2023, 19:38

So, I rn I just testing the auth flow and as I don't have SMS services for now, so It would be nice if I can call createPhoneSession which I hope create a new-user but as my phone SMS service is not avl will it fail?

TL;DR
The user is asking if it's possible to create a session for a user via the console. They also mention wanting to postpone integrating SMS and ask if it is possible to create a session via the console and fetch the active session token by providing the user ID. The response suggests trying the appwrite-explorer repository to test as an end user. It is also mentioned that the session is stored in a cookie and the createPhoneSession function will create a new user but will fail if the SMS service is not available. There is no solution provided for creating a session via the console without integrating SMS.
Vedsaga
18 Mar, 2023, 19:40

or is there work around for ? can I create session via console and then fetch the active session token by providing userid?

Drake
18 Mar, 2023, 20:27

You would need to set some sms provider values. It will create a new user if there's no user with the phone number, but, no sms would be sent because the keys are wrong

Vedsaga
19 Mar, 2023, 03:37

oh got it, thank :)... What about session creations? As I saw that calling createPhoneSession return Token object that contain sessionID so, will sessionID still be returned in response?

Drake
19 Mar, 2023, 03:38

Sure, but the actual session is in a cookie rather than response body

Vedsaga
19 Mar, 2023, 03:40

oh got, it this means I can technical consider user login right? (as rn I am testing phase) so, this means I would be able create, update, edit documents.. as I have set permission...

Drake
19 Mar, 2023, 03:45

No, the session isn't saved and used. If you want to test stuff as an end user, you could try this:

https://github.com/stnguyen90/appwrite-explorer

Vedsaga
19 Mar, 2023, 03:47

when I test I mean, I want to postpone the integration of SMS ( as I am not able to find any SMS provider in India as seek alot of company Documents)

Vedsaga
19 Mar, 2023, 03:47

so, I was thinking to integrate that last phase

Vedsaga
19 Mar, 2023, 03:48

for now just wanted to create a session via console. I wonder if that is possible?

Drake
19 Mar, 2023, 03:48

No it's not

Vedsaga
19 Mar, 2023, 03:49

oh, πŸ˜… I guess then I think I will mark aloow everyone to edit the document for now during dev mode

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