Integration 0Auth in mobile apps
Hello,
I am integrating OAuth in my iOS app using Auth0 with Linode as a custom social connection. I've encountered an issue with the redirect URI during the authentication flow.
After the user authenticates with Linode, I need to redirect back to my app using a custom URL scheme (e.g., com.DumbSoftwareCompany.Linode://callback). However, when I attempt to set this custom URL scheme as the callback in the Linode OAuth client settings, I receive an error stating "Invalid protocol (use one of http, https)."
Linode's OAuth configuration seems to require a callback URL with a standard web protocol (http or https), which is not compatible with the custom URL scheme required for deep linking back into a native iOS application.
How can I configure a custom URL scheme for my mobile app in Linode's OAuth settings? Has anyone faced a similar issue, or is there a workaround to allow Linode to redirect to a custom scheme rather than a web URL?
Any guidance or advice on this matter would be greatly appreciated. Thank you!
1 Reply
I don't have any experience with the services you're using but I did a bit of digging and found that this issue with OAuth popped up on Stack Exchange with regard to Google Cloud as well. I found some posts that may be relevant to your situation that I'll link below:
- Google Oauth redirect to ios custom url - this person offers a block of code used in their
info.plist
file. Assuming your app is using a info.plist file, this may be useful. - Using custom URI schema with OAuth 2.0 - This is another google-centric question however, the answer given could be helpful.
- How to redirect to iOS when custom URI Scheme not supported by provider - the answer offered here suggests creating a webtask, however someone else says that didn't work for them.
- Redirect URI to application when http or https is required - The solution here involves a Web API
You can also double check the Linode documentation on Managing the OAuth 2 Callback URL.