Dynamic Oauth2 Redirect URL for subdomains

Tuesday, November 3, 2015

I have built a web app (in html & php) which interacts with an api via Oauth2 curl commands.



The app comprises of a main site (for example www.myapp.com) on which users can register and create new sites as subdomains (for example www.newsite.myapp.com)



On the new site users are presented with a button to action the api call.



The api call for the base site (e.g. www.myapp.com) works fine as I have simply set the oauth redirect url to return to the base url (i.e. www.myapp.com) I'm now stuck with utilizing the oauth process to interact with the api for subdomains as I want the redirect url to return the the subdomain.



Is there any way to set the redirect URL for oauth2 api interaction dynamically to solve this?



Many thanks,



Matt

0 comments:

Post a Comment