Back

Error logging in user through GitHub OAuth

  • 1
  • Users
  • Flutter
  • Accounts
mmjsmohit
8 Jun, 2023, 07:27

Getting the following error: Unhandled Exception: Invalid argument (callbackUrlScheme): must be a valid URL scheme: "appwrite-callback-myProjectID"

I have added the following to my AndroidManifest.xml: <activity android:name="com.linusu.flutter_web_auth_2.CallbackActivity" android:exported="true"> <intent-filter android:label="flutter_web_auth_2"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="appwrite-callback-myProjectID" /> </intent-filter> </activity> How should I fix this?

TL;DR
The user is experiencing an error logging in through GitHub OAuth. They are unsure if having capital letters in their project ID is causing the issue. They tried changing the URL scheme to a simple string without hyphens, but they are still getting an error. They have added the necessary code to their AndroidManifest.xml file, but they need help fixing the error.
ox1gn
8 Jun, 2023, 08:22

Can you try changing your url scheme to the required format of a simple string (that is, without hyphens)?

You can try changing it to like appwritecallbackmyprojectid or appwriteCallbackMyProjectID instead.

Example: <data android:scheme="appwritecallbackmyprojectid" />

In doing so, update your callback URLs everywhere you use them in your code to reflect the new scheme and avoid any other errors.

mmjsmohit
8 Jun, 2023, 08:54

Sure. I'll try it and give you an update.

mmjsmohit
8 Jun, 2023, 09:12

Still dosen't work

mmjsmohit
8 Jun, 2023, 09:13

Actually I am having some Capital letters in my project ID. Is that an issue?

ox1gn
8 Jun, 2023, 14:29

Sorry for the late reply. After doing the changes, is the error message the same?

Drake
8 Jun, 2023, 14:31

ya...captial letters is a problem 😕 we've actually started talking about this internally to only allow lowercase alphanumeric characters for project ID to avoid this type of problem

Drake
8 Jun, 2023, 14:32

FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting.

mmjsmohit
8 Jun, 2023, 14:33

Thanks for the info. Will keep that it mind next time.

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