Skip to content
Back

[SOLVED] Able to Github login on local but not working on deployed version.

  • 0
  • Accounts
Vishwajeet Raj
7 Oct, 2023, 08:22

Getting this error on deployed version. {"message":"Invalid success param: URL host must be one of: localhost, cloud.appwrite.io, *","code":400,"type":"general_argument_invalid","version":"0.11.10"}

link: https://expensasaurus.vercel.app/

code used for login.

TypeScript
                "github",
                `${window.location.origin}/dashboard`,
                `${window.location.origin}/`
              );
TL;DR
Title: Github login working locally but not on deployed version [SOLVED] Message: I was able to resolve the issue. Make sure to add a web platform with a matching hostname. The error you encountered on the deployed version is `"Invalid 'success' param: URL host must be one of: localhost, cloud.appwrite.io, *"`. Solution: Update your code for the login as follows: ``` account.createOAuth2Session( "github", `${window.location.origin}/dashboard`, `${window.location.origin}/` ); ``` Link: [Expensasaurus deployed version](https://expensasaurus
Drake
11 Oct, 2023, 02:21

did you add a web platform with matching hostname?

Vishwajeet Raj
11 Oct, 2023, 05:42

Fixed

Drake
11 Oct, 2023, 16:50

[SOLVED] Able to Github login on local but not working on deployed version.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more