Skip to content
Back

OAuth: "Missing redirect URL"

  • 0
  • Android
  • Flutter
  • Web
Cartok
12 Jan, 2024, 17:37

Hi there,

I have a problem with setting up OAuth.

I followed the documentation to set up OAuth for GitHub and Google. I used this documentation to set it up in GitHub.

The code in the end looks like this:

TypeScript
// file: client.dart
Client client = Client()
    .setEndpoint('https://cloud.appwrite.io/v1')
    .setProject(dotenv.get('PROJECT_ID'))
    .setSelfSigned(
      status: true,
    );

// file: account.dart
final Account account = Account(client);

// file: login_form.dart
// - Inside a button callback:
await account.createOAuth2Session(
  provider: 'github',
);

The PROJECT_ID is set, the connection is working in other areas.

With or without "self signed" does not change the result.

I am using my smartphone to run the code.

TL;DR
Problem: The developer is having an issue with setting up OAuth for GitHub and Google. They have followed the documentation but are encountering an error related to a missing redirect URL. They are using their smartphone to run the code. Solution: To fix the missing redirect URL issue, the developer needs to make sure that they have correctly set up the redirect URL in the OAuth app settings for both GitHub and Google.
Drake
12 Jan, 2024, 17:41

What's your project id?

Drake
12 Jan, 2024, 17:42

Can you check what's the exact url on this page?

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