I am trying to implement Sign in with Apple in the Unity editor. I am doing this using the REST API oauth flow. In my other oauth implementations I have been able to set a valid redirect url as localhost, so I can catch the response in the app with a http listener. However, Apple does not allow this address, not 127.0.0.1 . How can I get the response code back in Unity? Sign in with Apple is so new that I have not been able to find any answers so far. All of the guides are for implementing Sign in in a web client, not an app.
Asked
Active
Viewed 4,649 times
3
-
It sounds like the redirect address has to be one reachable for Apple, so routed in the web? – derHugo Nov 20 '19 at 16:38
-
You need to be able to validate your `redirect_uri` while creating a Service ID and for Apple to be able to verify your given address it needs to be a live website which is reachable from the internet. – Ayazmon Nov 29 '19 at 13:16
1 Answers
8
Open etc/hosts file and add record to it
127.0.0.1 mylocaladdr.test
Use the following redirect uri address instead of localhost:
http://Mylocaladdr.test/appleredirect
Add other real domain and verify it. Add real redirect uri, which later will be used.
Access Denied
- 8,723
- 4
- 42
- 72
-
You can also try Fiddler2 if you want to redirect for some specific port on your local machine. See https://stackoverflow.com/a/21586034/9307598 – Aliaksandr Hamayunau Mar 03 '21 at 21:36