Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OrangeHRM: Google oauth redirects to login page after successful authorization instead of Dashboard

Tags:

I am using opensource OrangeHRM and after logging in through admin,

I went to:

1.  Admin -> Configuration -> Social Media Authentication  
2.  Select Google+ from dropdown.
3. Add Client id, secret, redirect url and saved.  

In login page, if logging in through Google option, it provides an option to select gmail account and once I select account and allowing my gmail account to access OrangeHRM, It takes me back to login page instead of dashboard after successful authorization.

Is there a way I can fix it? As per one of documents of OrangeHRM, i.e. User Guide, it says:

 Google Plus -
  This section allows configuring the Google + providers.   
  This section should be enabled from the back end.    

I am not sure If I need to enable anything from backend and If so, what and where should I enable the same?

like image 416
Abhishek Avatar asked Sep 29 '15 14:09

Abhishek


1 Answers

The redirect URI (where the OAuth response is returned to) has to be registered in Google APIs console, and the error is indicating that you haven't done that, or haven't done it correctly.

Go to the console for your project and look under API Access. You should see your client ID & secret there, along with a list of redirect URIs. If the URI you want isn't listed, click edit settings and add the URI to the list.

like image 96
Amar Pratap Avatar answered Sep 22 '22 18:09

Amar Pratap