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

When I log in with an unregistered mobile number, The Provider still sends SMS to this phone number #47

Open
Charlie133 opened this issue Apr 26, 2023 · 2 comments · May be fixed by #75
Labels
enhancement New feature or request

Comments

@Charlie133
Copy link

When I log in with an unregistered mobile number, The Provider still sends SMS to this phone number。
I don't know if I'm misconfigured.
can you help me please?

@QQAnh
Copy link

QQAnh commented May 29, 2023

You can go file TokenCodeResource.java line 48 in folder keycloak-phone-provider/src/java/cc.coopersoft.keycloak.phone/providers/rest and see what it does

@cooperlyt
Copy link
Owner

code

` // everybody phones authenticator send AUTH code
if( !TokenCodeType.REGISTRATION.equals(tokenCodeType) &&
!TokenCodeType.AUTH.equals(tokenCodeType) &&
!TokenCodeType.VERIFY.equals(tokenCodeType) && // <----- remove this will be stop unregistered , but everybody phones authenticator will be fail.
Utils.findUserByPhone(session, session.getContext().getRealm(), phoneNumber).isEmpty()) {
throw new ForbiddenException("Phone number not found");
}

`

@cooperlyt cooperlyt added the enhancement New feature or request label Jul 24, 2023
@mapidentity mapidentity linked a pull request Sep 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants