AppAuth-iOS icon indicating copy to clipboard operation
AppAuth-iOS copied to clipboard

Sign in with apple - invalid web redirect url.

Open davidvirdeforshh opened this issue 5 years ago • 8 comments

I'm trying to add support for "Sign in with Apple" using Microsoft azure ad b2c. I reach appleid.apple.com and get an error saying:

invalid_request
invalid web redirect url.

Do anyone know which values I should be using for the return URLs field in the Apple Services IDs configuration? image

msal[client_id]://auth/ is not allowed as it is an invalid format. (Must start with https://) I also tried: https://<my_tentant>.b2clogin.com/<my_tentant>.onmicrosoft.com/oauth2/authresp without success.

Any ideas?

davidvirdeforshh avatar Sep 15 '20 16:09 davidvirdeforshh

Also stuck on this with Expo + React Native with AWS Amplify (Cognito).

works fine for Facebook and google but apple complains! Driving me nuts.

gruckion avatar Jun 12 '21 22:06 gruckion

Any updates here, I ran into same issue?

gajvaz avatar Feb 17 '22 07:02 gajvaz

Hit the same issue with Auth0 - trying to add "com.companyname.app://mytenant.eu.auth0.com/ios/com.companyname.app/callback" to return urls but get error "One or more Return URLs are invalid."

Anyone manage to figure it out?

UPDATE: Okay so I have resolved for my scenario (using Auth0)... apparently you use 'https://YOUR_DOMAIN/login/callback'

msivers avatar Apr 28 '22 00:04 msivers

@msivers Just saved me and the team a night of sleep, immense thank you from the developers of Aswell! :) Auth0 should include this in the official documentation.

mputnieks avatar Sep 28 '22 19:09 mputnieks

This looks like it's related to a web rather than a native client. Did you mean to add this issue in AppAuth-JS?

petea avatar Oct 19 '22 22:10 petea

@petea nope - this is in the context of a native app/client but using the web based authentication provided by the IDP (as per most IDP recommendations). In my case it was Auth0 but could be Microsoft AD B2C or similar.

e.g. https://auth0.com/docs/quickstart/native/ios-swift/interactive#add-login-to-your-app

msivers avatar Oct 20 '22 00:10 msivers

Hit the same issue with Auth0 - trying to add "com.companyname.app://mytenant.eu.auth0.com/ios/com.companyname.app/callback" to return urls but get error "One or more Return URLs are invalid."

Anyone manage to figure it out?

UPDATE: Okay so I have resolved for my scenario (using Auth0)... apparently you use 'https://YOUR_DOMAIN/login/callback'

Saved the day!

nisseenn avatar Feb 13 '23 16:02 nisseenn

UPDATE: Okay so I have resolved for my scenario (using Auth0)... apparently you use 'https://YOUR_DOMAIN/login/callback'

@msivers thank you for you discovery! Helped immensely!

zachnicoll avatar Feb 23 '23 02:02 zachnicoll