Back

[SOLVED] Missing Redirect URL for sign in with apple

  • 1
  • Flutter
  • Accounts
Tim Se
7 Nov, 2023, 07:46

We have followed the steps on this blog: https://dev.to/appwrite/apple-sign-in-with-appwrite-2576 to set up the apple sign in.

After the user has signed in with their appleid, it shows a missing redirect url.

more context:

  • no sessoin was created.
  • the flutter code to sign in:
TypeScript
await _apiService.loginWithOAuth(provider);
TL;DR
The user was experiencing a missing redirect URL issue when using Sign in with Apple. The problem was identified as an extra space in the value added in the Appwrite Console. The issue was resolved by removing the extra space. Additionally, the user asked if anything needed to be added in the info.plist, but no response was provided in the thread.
ideclon
7 Nov, 2023, 10:12

You seem to be missing the redirect URIs in your loginWithOAuth(). The second parameter should be a redirect URI for on success, and the third for on failure.

Tim Se
8 Nov, 2023, 09:16

@ideclon I dont think success parameter is required (it's optional right)?

ideclon
8 Nov, 2023, 12:54

Technically, yes. But if you don’t set it, the application has no way to know what to do after completing the login.

Drake
10 Nov, 2023, 18:56

success and failure URLs are optional in mobile. You may see that missing redirect, but you should still be automatically redirected back to your mobile app. You may need to tap some confirmation or choose which app to redirect to.

Tim Se
14 Nov, 2023, 07:24

But I dont see any session being created. account.get() will get nothing

Drake
14 Nov, 2023, 18:02

can you tell what URL you're ending up on?

Tim Se
17 Nov, 2023, 00:25
Drake
17 Nov, 2023, 01:51

Ok so that's.the problem. Failed to obtain access token because of invalid client. Something is wrong with what you put in Appwrite for the oauth configuration vs what's in apple

Tim Se
20 Nov, 2023, 05:41

I see. Thank you Steven, I will take a look into this.

Tim Se
22 Nov, 2023, 01:28

It's werid that all AppID, Services, Keys are matching from the apple side and the appwrite side.

Is there anything else we could have missed? We have gone through this https://dev.to/appwrite/apple-sign-in-with-appwrite-2576 several times to double check.

Do we also need to add anyhting in the info.plist?

Thank you for your assistance

Drake
22 Nov, 2023, 02:52

Can you dm me what you've set for everything?

Tim Se
22 Nov, 2023, 02:54

Sure

Drake
22 Nov, 2023, 03:16

Turns out the problem was an extra space in the value added in the Appwrite Console.

Marking this as solved now

Drake
22 Nov, 2023, 03:16

[SOLVED] Missing Redirect URL for sign in with apple

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