-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Hello.
I want to use this service to develop my own personalized authentication.
- Find the user
- Create the JWT access token for that user
let findUser = await this.userRepository.findOne({
where: {
mobile: credentials.mobile
},
order: ["id DESC"]
});
const token = await this.jwtService.generateToken(findUser.id);
return { access_token: token }
The code I wrote does not work because method (generateToken) inputs argument must be an email and a name.
I want to authenticate with a mobile number.
please help me.