oAuth2 API Connection - Redirect to Callback [solved]

Hi,

I am implementing an oAuth2 RESTful API client into my application & cannot seem to forward the user back to the application’s pages.

This is what happens:

  1. Application checks if it has been authenticated to access the API (assume it hasn’t been authenticated yet)
  2. Application detects that it has not been authenticated and forwards the user to http://mydomain.com/api/authorize
  3. Server authenticates the user if the user/pass combination matched. It is then supposed to forward to a callback URL with the appropriate access codes (e.g. http://localhost/callback.php) but I cannot figure out how to forward back to the pages I have compiled into my application.

Any suggestions would be most welcome

Many thanks
Dave

Taken a while but I’ve finally figured it out:

header(“Location: %url%”);

^ this works fine, I was trying http:// beforehand which doesn’t seem to work

Hopefully this will help someone else :slight_smile: