Error with Universal Link in IOS After Auth


I am launching the auth process with Nest from my IOS app and, after approval, it redirects to my callback on my backend server. That callback processes the state and access code and then redirects to a universal link that my app has registered. Instead of cross-launching my app, it just forwards my browser to that url. I do the exact same process with fitbit and everything works properly. I have verified that the backend callback is working and that the universal link would normally open the app, but in this one case, it seems that ios is unable to launch the universal link correctly with the nest when it can do it with fitbit. The only difference I’ve noticed in the flow is that nest seems to do a lot more redirects before it finally redirects to my callback. Is anyone else seeing this?


You’re initiating authorization through a web view within your iOS app, yes? Once authorization is complete you should just drop the view and resume in the app, you shouldn’t need to redirect it to a universal link… unless I’m missing something?


Our app opens up a safari window pointing to the authorization url:[Our Client ID]&state=[A UUID we assign]

This then pushes the user through the Nest auth process and then calls the callback url on our backend server. Our backend server processes the authorization information and then sends a redirect to a universal link that is registered to be opened with our app. For some reason, this redirect is not opening up our app again. We perform this exact same flow with fitbit and have no issues. We have even tested using the exact same universal link that we use for fitbit and it has not solved the issue.


Are you using a SFSafariViewController within your iOS app to do that, or sending them to the Safari app itself?

I can’t speak to why your process works for Fitbit, but this seems to be something to do with how universal links are handled within iOS. Typically they don’t work as part of a redirect.