Rank 2: Process
I get the error with NextJS and GitHub OAuth, i found this and tried to use it to solve by moving from locahost to using sub domains https://github.com/appwrite/appwrite/issues/1203#issuecomment-850787160
{"message":"Invalid `success` param: URL host must be one of: localhost, appwrite.jaoudestudios.co.uk, *.vercel.app,localhost,rating.jaoudestudios.co.uk","code":400,"type":"general_argument_invalid","version":"0.11.33"}
After research, I have done the following, am I missing something?
- used a custom sub domain
appwrite.jaoudestudios.co.ukand added it to my Appwrite Cloud project - using custom sub domain to connect to Appwrite
const client = new Client() .setEndpoint("https://appwrite.jaoudestudios.co.uk/v1") .setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID);- using a host file for
rating.jaoudestudios.co.ukto point tolocalhost, and added to allowed hostnames
const login = async () => { account.createOAuth2Session( "github", "http://rating.jaoudestudios.co.uk:3000/account", "http://rating.jaoudestudios.co.uk:3000/failed" ); };- github oauth settings is
https://appwrite.jaoudestudios.co.uk/v1/account/sessions/oauth2/callback/github/XXX