I've started integrating Sign In With Apple to my website, but I'm having some issues. I THINK I've configured Sign In With Apple on their end as it should be.
Next, I configured my HTML/CSS/JS as I saw on an article. When I click the "Sign In With Apple" button, it takes me to this screen:
I've been struggling with this for hours, what am I doing wrong?
Thanks, Jackson
I had the same problem. A few things tripped me up:
In Apple Dev portal, your "Return URLs" need to have "https://", e.g. https://myawesomepwa.com. Meanwhile, the "domains and subdomains cannot have https; it must be the bare domain, e.g. myawesomepwa.com.
Make sure all the URLs you specify don't have a trailing slash.
In your JS code, make sure your redirect URL doesn't have a trailing slash:
Example JS code:
AppleID.auth.init({
clientId : this.clientId,
scope : "email",
redirectURI : "https://myawesomepwa.com",
state : "initial",
usePopup : true
});
Once I did that, Sign in With Apple started working.
In my case the error message 'invalid_request: Invalid redirect_uri.' was badly misleading! The problem was that I did not create a Key in "Certificates, Identifiers & Profiles/Keys".
So: Click + to create a new Key -> Enter a name and check Sign in with Apple -> Click configure button next to the checkbox -> select your Primary App ID.
I followed this tutorial: Sign In with Apple: Learn About the New Identity Provider
Seems like you have solved it, I think the issue was the trailing slash on the redirect_uri, removing it might solve this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With