![](https://cdn.discordapp.com/avatars/319138840092606465/d3eedae9a78d3e3e7ddad2bd7342155c.webp)
Hi guys,
I am a bit new to Appwrite and tried to convert an example app i've built using a tutorial with supabase. The authentication goes trough GitHub, and with Supabase, it returns "code" with the callback. But I do not get "code" when using OAuth with appwrite. I do get authenticated on CSR, and do get informations (have no idea how, as there is no cookies or localstorage tokens), but I can't get anything on SSR.
Do you guys have an example of how this can be accomplished?
Took a look at Meldirons solution, but that is with "anonymous" authentication, which is another flow.
My apps source code: https://github.com/HarunKilic/twitter-clone
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
Ya...we're working on improving the experience with SSR
A workaround right now might be to use /auth/oauth2/success
as the success path in your SSR app. When you use this path, there will be a secret in the URL which you can extract and put in a cookie to use for future requests.
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
Here's an example of how it's extracted in flutter: https://github.com/appwrite/sdk-for-flutter/blob/b6df91102d7f9d22f44185cfd5490b767e58cfd6/lib/src/client_io.dart#L337
![](https://cdn.discordapp.com/avatars/319138840092606465/d3eedae9a78d3e3e7ddad2bd7342155c.webp)
I do not get any success or key in the url.
Tried following:
button action
:
account.createOAuth2Session('github',
${location.origin}/auth/callback);
in /auth/callback
const requestUrl = new URL(request.url);
const code = requestUrl.searchParams.get("secret");
console.log(requestUrl, code);
// Res - http://localhost:3000/auth/callback | null
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
Use the path I suggested
![](https://cdn.discordapp.com/avatars/319138840092606465/d3eedae9a78d3e3e7ddad2bd7342155c.webp)
Oh I see. That is a sneaky sneaky one
![](https://cdn.discordapp.com/avatars/923964089758285834/d7484ad8015ee8ee6439e4664057b7b9.webp)
Hi. I'm getting a project
, key
, and secret
in the URL. but I'm a bit confused what should I do with these? Can you please show/redirect me to a JS example?
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
it would be best to continue in your thread instead of posting here
Recommended threads
- 2FA
I am trying to generate a QRCode for my 2FA, it generates the qrcode, I can add it to my authenticator app, but then when I enter the passcode to verify it says...
- Scopes settings not available for Functi...
As per the documentation, I should see a Scopes section in the settings of the particular Appwrite Function. But I don't see it. I'm not able to access my col...
- role based login:
I want to redirect admin to admin page and others to user page, how can I do so?
![](/images/bgs/pre-footer.png)