how can i create an email session use this session to get the providerAccessToken from the BE side, this what i have however the const client = new Client() .setEndpoint(this.baseUrl) .setProject(this.projectId); const account = new Account(client2); const appwriteSession = await account.createEmailSession( user.email, pass, ); however the providerAccessToken is empty
That's only available for oauth sessions.
What exactly are you trying to accomplish?
Impersonate the user?
i am crating the signIn method, and i want to get an access_token
Creating a session with email is available only on the client-side.
ohh i see so if the sigin is only through email and password i can't get a session right from the server side?
FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting.
typically, authentication happens client side and server side SDKs are meant for admin related things. see https://appwrite.io/docs/sdks
ok thank will use that, this my first time using discord i see ok thank you
no worries!
Also some more helpful docs:
thanks
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...