token-builder icon indicating copy to clipboard operation
token-builder copied to clipboard

Checking if related User has a valid token

Open paulo-hortelan opened this issue 1 year ago • 3 comments

Is there a method to, without the token, check if the related User has any valid token? In case not and you believe that this would be a nice new feature, I could do a pull request

paulo-hortelan avatar Sep 25 '24 14:09 paulo-hortelan

Hi Paulo, thanks for creating this issue. what would be the use case of this feature?

khanzadimahdi avatar Sep 26 '24 09:09 khanzadimahdi

I need to know if the user has any valid token before allowing him to create a new one. Basically, is the token/pin Forgot password.

Right now I'm looping through the users related tokens and checking if if he has one valid but having a method that can do that would be great.

paulo-hortelan avatar Sep 26 '24 10:09 paulo-hortelan

I agree that it's a good idea to add functionality to get user's valid tokens by type.

could you please create a PR for that?

khanzadimahdi avatar Sep 26 '24 11:09 khanzadimahdi