BA
Better Auth•5mo ago
Genio

No mention of callback url in docs for Apple

I am adding social sign in and already added entra and google. However with apple, it works and i am getting the prompt to sign in with them however after that is done i get error
{"code":"INVALID_ORIGIN","message":"Invalid origin"}
{"code":"INVALID_ORIGIN","message":"Invalid origin"}
There was no redirect url explanation in the docs so i assumed it would be
https://domain/api/auth/callback/apple
https://domain/api/auth/callback/apple
and added it to the redirect urls in apple's service But... i think thats wrong? cause my redirection keeps erroring out with Invalid origin. Is there a step i am missing to why there isnt a redirect url? Thank you 🙏
16 Replies
Genio
GenioOP•5mo ago
Apple's ( No redirect url)
Genio
GenioOP•5mo ago
No description
Genio
GenioOP•5mo ago
Microsoft
No description
Genio
GenioOP•5mo ago
Also, there should be a note saying the same as the tiktok docs since apple is the same and doesnt work with localhost. Is there a way for me to contribute to the docs ?
No description
nikatune
nikatune•5mo ago
yeah just go github
KiNFiSH
KiNFiSH•5mo ago
yeah it needs an update feel free to do that
Genio
GenioOP•5mo ago
Thank you, will do that. However, do you guys have any idea what is causing the
{"code":"INVALID_ORIGIN","message":"Invalid origin"}
{"code":"INVALID_ORIGIN","message":"Invalid origin"}
error ?
KiNFiSH
KiNFiSH•5mo ago
do you have a trustedOrigins config on authConfig and it may be likely affecting your origin check
Genio
GenioOP•5mo ago
Yep, I added it later on and it worked, but that’s weird. Shouldn’t the Apple domain already be trusted?
Ping
Ping•5mo ago
You had to add apple's origin to trustedOrigin to work?
Genio
GenioOP•5mo ago
Yeah Currently i think the docs lack in that part of how to add apple as a provider. So, i will try to contribute to it whenever i can 🤞
Ping
Ping•5mo ago
Yes thanks
Genio
GenioOP•5mo ago
There was no clear mention of the this in the contribution docs but i was wondering, is it okay to use a component that generates the apple JWT on the clinet side ? I was thinking of making it easier to generate in house just like how the secret is generated in the installation manual
Genio
GenioOP•5mo ago
GitHub
docs: Add guide for Sign In with Apple by TheGenio · Pull Request ...
I noticed the docs were lacking in regards to apple sign in integration so i wanted to contribute to make sure others have an easier time than me. I Noticed that step 1 was longer than all other st...
Genio
GenioOP•5mo ago
pr open
squishycantaloupe
squishycantaloupe•4mo ago
I'm trying to figure out apple sign in -- shouldn't the jwt be generated on the server as it requires a bunch of sensitive information as input (e.g, the p8 file)

Did you find this page helpful?