Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth2 authentication implementation #3094

Merged
merged 3 commits into from
Oct 16, 2021
Merged

Conversation

artur-shaik
Copy link
Contributor

This PR shoul fix #2392. To implement OAuth2 authentication I've used passport-oauth2 strategy.

Tested with my own Nextcloud instance.

This PR shoul fix requarks#2392. Used `passport-oauth2` strategy.
@martinkoutecky
Copy link

Hi! What needs to happen to have this merged? Is there some way I could test this if I run wikijs from docker?

@artur-shaik
Copy link
Contributor Author

@markspolakovs I think you can connect to docker and just copy those new files to your instance

@blt950
Copy link

blt950 commented Aug 8, 2021

This is great and a proper OAuth2 integration :) Today's OIDC module doesn't for most OAuth2 handlers that are not strictly OpenID with the hardcoded scoped fields it requires, and I like that we can adjust the scope in properties here, that solves all the problems we've had.

@Czujackt
Copy link

What is the current status?

@ghost
Copy link

ghost commented Oct 15, 2021

Is there any chance to get it merged soon?

@NGPixel NGPixel merged commit 87084c6 into requarks:dev Oct 16, 2021
@NGPixel
Copy link
Member

NGPixel commented Oct 16, 2021

You can use docker image requarks/wiki:canary-2.5.232 to get the module right now. It will be included in the next release.

@artur-shaik artur-shaik deleted the pr/oauth2 branch October 16, 2021 15:50
@btittelbach
Copy link

Took me a good hour to find this information, so putting it here:

To use Nextcloud as OAuth2 Provider for wikijs, these are the correct settings:

ID Claim: ocs.data.id

Display Name Claim: ocs.data.display-name

Email Claim: ocs.data.email

Otherwise you might end up with an error like Missing or invalid email address from profile.

@mariosgit
Copy link

mariosgit commented Jan 10, 2022

Took me a good hour to find this information, so putting it here:

To use Nextcloud as OAuth2 Provider for wikijs, these are the correct settings:

ID Claim: ocs.data.id

Display Name Claim: ocs.data.display-name

Email Claim: ocs.data.email

Otherwise you might end up with an error like Missing or invalid email address from profile.

Hi, I'm trying the same, where did you put these settings, the UI only shows me the emailClaim field (version 2.5.268) And how does your UserInfoEndpoiuntURI look like "https://cloud.my.com/ocs/v1.php/cloud/users?format=json" ?

@btittelbach
Copy link

Took me a good hour to find this information, so putting it here:
To use Nextcloud as OAuth2 Provider for wikijs, these are the correct settings:
ID Claim: ocs.data.id
Display Name Claim: ocs.data.display-name
Email Claim: ocs.data.email
Otherwise you might end up with an error like Missing or invalid email address from profile.

Hi, I'm trying the same, where did you put these settings, the UI only shows me the emailClaim field (version 2.5.268) And how does your UserInfoEndpoiuntURI look like "https://cloud.my.com/ocs/v1.php/cloud/users?format=json" ?

In Wiki.js 2.5.268, using the new Generic OAuth2 Strategy as opposed the Generic OpenID Connect / OAutth2 Strategy the dialog looks like this for me. Hope this helps.
Screenshot wikijs oauth2

@mariosgit
Copy link

Thank you very much, It works now. I had to add a new "Generic OAuth2" strategy in order to see the additional input fields.
Cheers.

jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this pull request Jul 9, 2024
* OAuth2 authentication implementation

This PR shoul fix requarks#2392. Used `passport-oauth2` strategy.

* indentations cleanup

* cleanup code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with using Nextcloud OAuth trough Generic OAuth connector (ID Token not present in token response)
7 participants