zendesk / samson

Web interface for deployments, with plugin architecture and kubernetes support
Other
1.45k stars 234 forks source link

User not able to login again to Samson using Github Id #4067

Closed tanpsingh closed 1 year ago

tanpsingh commented 1 year ago

There is an issue with the user log in. Samson and GitHub are not able to authorize the login to access the samson tool. Getting below error:

[id:9ce0e0e0-a344-4d76-bd3f-9140025aacb9] [ip:49.37.162.3] Halted as unauthorized! threw :warden (called from /app/controllers/concerns/current_user.rb:26:in login_user)

The user got deleted from Samson's user management and after he is not able to log in. Even though we have tried to revoke access from GitHub and then log in again but it's not working and getting the above error.

We are using samson login is integrated with Github therefore we using Github ID to access the samson tool.

grosser commented 1 year ago

users have soft deletion so I think if you find the user and undelete them, things will work out

User.with_deleted { User.find_by_email("foo").update_column :deleted_at, nil }

tanpsingh commented 1 year ago

@grosser Thanks for your reply.

Do you know how we can undelete them? or can we do a hard delete and ask the user to log in with a GitHub id?

grosser commented 1 year ago

use the command I posted in the rails console

tanpsingh commented 1 year ago

Ok. Sure

I will try the above command. Thanks alot.

grosser commented 1 year ago

plz reopen if it does not fix the issue :)

tanpsingh commented 1 year ago

Thanks, it's working user is undeleted and visible in the samson user management window.