邮箱域名调整导致Gitlab统一登录失败(422)

背景:

1、公司使用腾讯玉符第三方统一登录,通过邮箱地址匹配账号,如果新入职人员可通过统一登录链接直接创建账号;

2、近期邮箱域名从@aaa.com改为了@bbb.com,老员工两个域名都可以使用(映射),新员工只有@bbb.com邮箱。

3、部分新员工由于不知名原因,登录时出现422 Sign-in using 统一登录 auth failed Sign-in failed because Email domain is not authorized for sign-up. Try logging in using your username or email. If you have forgotten your password, try recovering it

 解决过程:

1、先怀疑是邮箱配置里 stmp_domain的配置问题(/etc/gitlab/gitlab.rb文件),注释掉并刷新gitlab配置再重启(gitlab-ctl reconfigure  gitlab-ctl restart)后,问题并没有解决

2、进db控制台(gitlab-rails dbconsole),查询改用户的邮箱发现还是@aaa.com(脚本:select id, email , name , notification_email from users where notification_email like 'zhangsan%' ;)

3、直接修改其邮箱为@bbb.com(notification_email 是登录用的邮箱,脚本:update users set notification_email = 'zhangsan@bbb.com',email = 'zhangsan@bbb.com' where notification_email = 'zhangsan@aaa.com' ;)

4、用户重新使用统一登录即可以进入系统(可能会需要发送验证邮件?不确定是否肯定会)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值