apple login with many sub domains
# support-questions
One more question about Apple auth. Apple always redirects back to our API instead of client (in comparison to google, let's say). supertokens then redirects back to websiteDomain that it has in config. The problem is how to handle situation when user can login both on and With google it logs in at and redirected back to it. With apple - it logs in at but get redirected to (because is a websiteDomain in API config)
hey @vyobukhov We are working on making this situation easier, but what you can do is to override the backend API for apple redirection in apis override, and implement your own redirection logic inspired by our sdk code (if you tell me which backend sdk you use, i can point you to the current impl). Second, you want to set a custom attribute to the state on the frontend which you can do by overriding the
function on the frontend and and generating your own state string containing the target domain (here is our implementation of generating a state: Then in your backend override for for apple redirection, you can read this state and know where to send the user to.