Generic OAuth2 Provider doesn't login
Actual behavior
When we attempt to log in via the OAuth2 login button, it correctly forwards us to our login page. Upon authorization, we're redirected back to /login and not logged in. There are no errors on the page or in the logs.
I also noticed that the other login types are selectable as a Provider on the Create/Authorize User page, while OAuth2 is missing - I'm not sure if this is related or not, but maybe we need to be able to add the user first?
Expected behavior
Log in the user.
Steps to reproduce the behavior
Hook up an OAuth2 provider, then try to login using the OAuth2 button.
I reproduce the exact same behavior and can add other provider such as Slack, but I suppose I need to connect to the wiki with admin user first and authorize users from the provider?
But unfortunately I cannot login with the admin user as I'm redirected to /login.
A little update from my side, the issue wasn't with wiki.js.
I actually deploy it on AWS with CloudFront, the issue was related to the Cookies forwarding. I put this option to "All" and works well now.
@remiakn Does that mean you got the OAuth2 login to work? Which option did you set to All?
Hi @codehtmai, yes I'm using Slack for the authentication. Into AWS CloudFront console, when you click on the desired distribution and then the tab "Behavior" then you select the desired behavior and button Edit. In the "Edit Behavior" page, scroll down and then put the "Forward Cookies" to "All".
Hi @codehtmai, did you get the OAuth2 login to work ? I have exactly the same issue with Google auth. When I select my Google account, I'm redirected back to /login and not logged in.
@maeldd Unfortunately, no. We had to drop Wiki.JS and find a different solution, as this was a hard requirement for us. I would still go back to use it if they were able to support this functionality.
Hi @remiakn, do you have an idea to fixed it on Heroku ? I understand the way you did it on AWS, but no way to find a solution for Heroku... Thanks !
Hi All, Is there any progress on this issue? I am trying to integrate wiki.js v1.0.117 with GitLab oauth provider but it gives "Invalid User Email". Kind Regards...
I'm having the same issue on wiki.js v2.0.12. After going through the Google OAuth login flow, we're redirected back to /login on the wiki and can't navigate to any other pages 😔