/.ts
Created
July 27, 2022 11:55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async sendPasswordResetEmail(email: string): Promise<void> { | |
try { | |
const axiosResponse = await this.httpService | |
.post( | |
`https://${configService.getAuth0Domain()}/dbconnections/change_password`, | |
{ | |
client_id: configService.getAuth0ClientId(), | |
client_secret: configService.getAuth0ClientSecret(), | |
connection: configService.getAuth0Connection(), | |
email, | |
}, | |
) | |
.toPromise(); | |
this.logger.log(email, 'Password reset email sent to'); | |
return axiosResponse.data; | |
} catch (err) { | |
this.logger.error(err); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment