Signup not verifying email with Redis config
Version: 0.26.0
Describe the bug
Signup not verifying user email with redis.
Steps To Reproduce
use docker image for redis:
redis:
image: 'bitnami/redis:latest'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_PORT_NUMBER=7000
ports:
- 7000:7000
networks:
- api-service
setup env for authorizer server:
environment:
- REDIS_URL=redis://redis:7000
signup:
await authorizer.signup({
email,
password: genPW,
confirm_password: genPW,
redirect_uri: config.authorizer.redirectURL,
roles: [`${role}`],
})
this result out:
access_token: null,
expires_in: null,
refresh_token: null,
id_token: null,
It all works with the same code if I don't use redis. Thanks :)
@peter-wd-1 by any chance you enabled email verification?
You also can check message attribute in response.
@peter-wd-1 I was trying to reproduce this, I don't think its redis issue, it might be because u have configured smtp server & that would have enabled email verification.
You can disable that from dashboard

Hi, @lakhansamani
I've already disabled email verification and I have setup SMTP as well.

So smtp setting and disable email verification can't be enabled at the same time?
Added little more context on this, I've been sending verification email to user separately from my own server. Authorizer server doesn't know if my server successfully verified user email. So I need to sign up user verified as default after I verify them my self. The reason I do this is that I need to signup user with pre generated password. And control user authentication flow in this way. Then later, user would use forgot password thus need SMTP as well.
@peter-wd-1 thank you for that information. Here the flow of execution will matter
Example if you disabled email verification first and then added smtp config it could change things. But I will dig deep here and let you know the root cause
Thanks for quick reply! I might need to try setting disable email verification again as a workaround.
@peter-wd-1 I was checking the code today and found email verification is done based on config flag only: https://github.com/authorizerdev/authorizer/blob/main/server/resolvers/signup.go#L179
However, when you update smtp config from dashboard / env file, I have logic to update that flag https://github.com/authorizerdev/authorizer/blob/main/server/resolvers/update_env.go#L236
So I think it is the flow issue. Toggling that switch of email verification should solve the issue.
Let me know if that helps, else I can dig dipper :-)
@lakhansamani thanks :) I'll try that today and let you know.
@peter-wd-1 any update on this?
Hey @lakhansamani Sorry, was busy for something else :(
I tested the flag truned off and on again. But no luck.. I also tried to start the container without SMTP config and setup from dashboard first then truned on the flag. Still having the same issue :(
@peter-wd-1 can you once try upgrading to latest version and see if the issue is still there.
I will also continue my try to reproduce it
Thanks
Sorry for late update after long time. So the issue seems resolved after update somehow. I don't know what caused the issue. But it works fine now Thanks.
Glad that it is resolved now :-)