Coder Social home page Coder Social logo

Comments (7)

xet7 avatar xet7 commented on May 26, 2024

@tholeb

Look at command:

sudo snap list

Are you running old Snap Stable WeKan 6.09
or newest Snap Candidate WeKan 7.x ?

Your OAuth2 settings should be:

  • username: email
  • email: email

And login with email address like [email protected] and password.

If you like to modify Full Name in WeKan, you should not add OAuth2 setting for Full Name at all. That way it is defined and saved at WeKan.

But if your OAuth2 server has some field that has Full Name, add that to OAuth2 settings.

WeKan can not save changes to OAuth2 values. Those are modified at OAuth2 server settings.

from wekan.

tholeb avatar tholeb commented on May 26, 2024

@tholeb

Look at command:

sudo snap list

Are you running old Snap Stable WeKan 6.09 or newest Snap Candidate WeKan 7.x ?

Your OAuth2 settings should be:

  • username: email
  • email: email

And login with email address like [email protected] and password.

If you like to modify Full Name in WeKan, you should not add OAuth2 setting for Full Name at all. That way it is defined and saved at WeKan.

But if your OAuth2 server has some field that has Full Name, add that to OAuth2 settings.

WeKan can not save changes to OAuth2 values. Those are modified at OAuth2 server settings.

I am indeed running the 6.09 version (weird, I just installed the app). Here is my original oauth2 settings :

sudo snap set wekan oauth2-enabled='true'
sudo snap set wekan oauth2-client-id='client id'
sudo snap set wekan oauth2-secret='secret'
sudo snap set wekan oauth2-server-url='https://discord.com/'
sudo snap set wekan oauth2-auth-endpoint='oauth2/authorize'
sudo snap set wekan oauth2-userinfo-endpoint='api/users/@me'
sudo snap set wekan oauth2-token-endpoint='api/oauth2/token'
sudo snap set wekan oauth2-id-map='id'
sudo snap set wekan oauth2-username-map='username'
sudo snap set wekan oauth2-fullname-map='username'
sudo snap set wekan oauth2-email-map='email'
sudo snap set wekan oauth2-request-permissions='identify email'

On another instance, I removed sudo snap set wekan oauth2-username-map='username' from the config, and I get "Internal Server Error". After a quick snap log wekan Here is the result :

2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:116:43)
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1768:18)
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at packages/ddp-server/livedata_server.js:719:19
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at packages/ddp-server/livedata_server.js:717:46
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at packages/ddp-server/livedata_server.js:715:46
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at new Promise (<anonymous>)
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at Session.method (packages/ddp-server/livedata_server.js:689:23)
2024-04-13T19:14:55+02:00 wekan.wekan[149829]:     at packages/ddp-server/livedata_server.js:559:43

I'll try to update to the newer version with snap and try again.

from wekan.

tholeb avatar tholeb commented on May 26, 2024

I installed the snap on channel latest/candidate (7.42.0).

I can confirm that removingsudo snap set wekan oauth2-username-map='username' (or using an empty value) throws that error :

2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1389:31)
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:116:43)
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1935:18)
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at getCurrentMethodInvocationResult (packages/ddp-server/livedata_server.js:808:38)
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at packages/meteor.js:365:18
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1389:31)
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at packages/ddp-server/livedata_server.js:827:46
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at new Promise (<anonymous>)
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at Session.method (packages/ddp-server/livedata_server.js:775:23)
2024-04-13T19:33:25+02:00 wekan.wekan[251496]:     at packages/ddp-server/livedata_server.js:639:43

How can I use an oauth2 login without defining a fullname so the user can change his fullname in wekan ?

Thanks a lot for your help.

from wekan.

xet7 avatar xet7 commented on May 26, 2024

@tholeb

You need to keep that username setting, so that it does not produce error.

sudo snap set wekan oauth2-username-map='username'

For fullname:

sudo snap unset wekan oauth2-fullname-map

from wekan.

tholeb avatar tholeb commented on May 26, 2024

@tholeb

You need to keep that username setting, so that it does not produce error.

sudo snap set wekan oauth2-username-map='username'

For fullname:

sudo snap unset wekan oauth2-fullname-map

I don't quite understand. If I set the value, I can't edit my profile, and if I unset it, I can't register a new user.

Is it possible to edit the profile (in my case, the fullname) of an oauth2 account ?

from wekan.

xet7 avatar xet7 commented on May 26, 2024

@tholeb

Are you using Discord as OAuth2 identity provider?

If you don't use OAuth2, and use username/password login, you can edit profile.

from wekan.

tholeb avatar tholeb commented on May 26, 2024

@tholeb

Are you using Discord as OAuth2 identity provider?

If you don't use OAuth2, and use username/password login, you can edit profile.

Yes, I'm using discord as an oauth2 provider.

I'll stick with the username/password login. Thank you for your help.

from wekan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.