Hi @Arpan Pandey
Could you explain in more detail what you're trying to do?
Votes
1
Replies
24
Participants
Unknown
Messages
25
Hi @Arpan Pandey
Could you explain in more detail what you're trying to do?
Rank 1: Thread
I'm trying to create a CLI so client side things
Rank 1: Thread
But I need a JWT to use client-side auth
Rank 1: Thread
I don't know how to create a JWT without opening a browser
What version of Appwrite are you using?
Rank 1: Thread
Cloud
Rank 1: Thread
1.1.2
Okay mind if I ask why you're using JWT? Can't you use the normal email/password auth method?
Rank 1: Thread
After I get a session
Rank 1: Thread
With email password
Rank 1: Thread
How do I use it to perform actions on user's behalf?
Ah okay that's what you want to do. Okay let me just check this out real quick.
As far as I can see in the docs, there are no docs for REST.
Are you restricted to using REST, or can you use something else?
Rank 1: Thread
I can use GraphQL
Rank 1: Thread
Or anything that doesn't need a browser or native app
Moderator
GraphQL is not available in cloud
Web, Flutter, Apple and Android are the only methods available for v1.1.2
Rank 1: Thread
So I should use external auth?
Rank 1: Thread
And then maybe link it using Auth0?
I didn't understand
Rank 1: Thread
I am saying I think I need to use an external auth provider
Ah yes. The current cloud version doesn't support what you need, so it's best to go for external auth.
Rank 1: Thread
Ok, thanks a ton!
Admin
you would have to call the create email session API manually and grab the cookie so that it can be used in the rest of the CLI tool.
See how we're extracting the cookie here: https://github.com/appwrite/sdk-for-cli/blob/b4619977eb95ca6650aa5291eb6a26d6bfa46eda/lib/client.js#L196