
my vercel logs
at _Client.redirect (node_modules/node-appwrite/dist/client.mjs:255:13)
at async Account.createOAuth2Token (node_modules/node-appwrite/dist/services/account.mjs:1148:12)
at async p (/var/task/.next/server/chunks/7178.js:1:23438)
at async (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:127:1299)
at async rc (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:126:11937)
at async an (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:132:1048)
at async eB (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:2871:22612)
at async el (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:2872:1548)
at async aT.renderToResponseWithComponentsImpl (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:2872:1643) {
code: 400,
type: '',
response: '',
digest: '728798511'
}```
code
```js
import { Client, Account, OAuthProvider } from "appwrite";
export const client = new Client();
client
.setEndpoint("https://cloud.appwrite.io/v1")
.setProject("668932430014a23f9ed8");
// .set(process.env.NEXT_PUBLIC_API_KEY);
console.log(client);
export const account = new Account(client);
export { ID } from "appwrite";
// Go to OAuth provider login page
account.createOAuth2Session(
OAuthProvider.Github, // provider
"http://www.blingo.tech/", // redirect here on success
"http://www.blingo.tech/login/", // redirect here on failure
["repo", "user"]
);

What's your success/failure URL

success : http://www.blingo.tech/ failure http://www.blingo.tech/login/

the thing is when i put it on vercel then i got this issue

Did you add your custom domain as a platform in your appwrite console?

yea ive put in the integrations part

do a wildcard one too?

Maybe an issue with the www subdomain?

wdm wildcard one too???

*.blingo.tech


ok

broo thankyou soooo much :appwritepeepo: it worked

Please be careful not to expose your API key. If it's a public env variable, it would be exposed.

Or www.bingo.tech because that's what your hostname actually is.

yea that was the issue

Also, you're executing createOAuth2Session()
server side...but that doesn't seem right...have you read through the SSR docs? https://appwrite.io/docs/products/auth/server-side-rendering#oauth2

ok thankyou for the guidance ill surely study that part 👍
Recommended threads
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
- [bug] API response is good but UI don't ...
Hi guys! When i got my object, it have billingInfo relation, in the web ui i just got pading state, and the row shows object is null, but when i work whit this...
