Back

Custom domain error in success callback

  • 0
  • Auth
  • Web
  • Cloud
Himanshu
14 Aug, 2024, 13:14

Invalid success param: URL host must be one of: localhost, cloud.appwrite.io, appwrite.io, *.devwtf.in

Type

general_argument_invalid

** have configured the domain correctly still its not working** the success url is: https://x0-gpt.devwtf.in/chat😭

TL;DR
Developers facing issues with using a custom domain in a success callback for their app. They discovered it only works with *.vercel.app domains and not for other domains. They suspect it's a bug as it's throwing an error when using a specific domain. The solution suggested is to try using `https://*.devwtf.in` instead of `*.devwtf.in`. The provided code snippet shows the implementation of GoogleSignIn and the error encountered. The error message indicates an invalid success parameter. The developers are seeking urgent assistance to resolve the issue.
Himanshu
14 Aug, 2024, 13:16

@Eldad its been 30 min am trying this can anyone help me ASAP pls

Kenny
14 Aug, 2024, 13:24

Can you send the code snippet?

Himanshu
14 Aug, 2024, 13:27

which code

Himanshu
14 Aug, 2024, 13:27
TypeScript
import { OAuthProvider } from "appwrite";
import { AppwriteUser } from "./init";

async function GoogleSignIn() {
  const isDevelopment = process.env.NODE_ENV === "development";
  try {
    AppwriteUser.createOAuth2Session(
      OAuthProvider.Google,
      isDevelopment
        ? "http://localhost:3000/chat"
        : "https://x0-gpt.devwtf.in"
    );
  } catch (error) {
    console.error("ERROR OCCURED WHILE LOGGING IN:", error);
  }
}

export { GoogleSignIn };
Himanshu
14 Aug, 2024, 13:30

@Moderator anyone pls ?

Himanshu
14 Aug, 2024, 13:33

ps: it works for localhost not for the domain

Guille
14 Aug, 2024, 13:33

Can you try https://*.devwtf.in instead of *.devwtf.in?

Himanshu
14 Aug, 2024, 13:34

ok wait

Himanshu
14 Aug, 2024, 13:34

throughs error value must be without path, port and protocol

Himanshu
14 Aug, 2024, 13:35

am sure now its a bug

Himanshu
14 Aug, 2024, 13:46

IT'S A BUG

it works only for *.vercel.app not for domains

Himanshu
14 Aug, 2024, 13:47

wasted a lot of time

Himanshu
14 Aug, 2024, 13:47

damn!

Himanshu
14 Aug, 2024, 13:51

dude its down now

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