Closed j3k0 closed 2 years ago
/me
endpoint: https://github.com/j3k0/ganomede-users/blob/master/src/api/api-me.ts
- [x] Add email confirmation status to the
/me
endpoint: https://github.com/j3k0/ganomede-users/blob/master/src/api/api-me.ts
another meta will be returned with the metadata of the user:
metadata: {
...,
ConfirmedOn: { //for each email confirmed, it will be listed here the key => email, value => timestamp of confirmation
'test@test.com': 12343432342,
'test2@test.com': 123543593483
}
}
step 1:
Send random access code by email. In ganomede-users, we need to remember that the user has confirmed his registration (user meta, confirmation date) => confirm email address by confirmation date.
2 cases: -on registration -on change email address. / exists an endpoint to change email address, directory metadata => email address. we need to send email confirmation only if not confirmed.
create new endpoint, to submit the access code (timeout 10 min configuration). TOTP 6 digits 5min
totp => secret key => user_email + _secretConfig , time 10 min gene => unique ..
/authe-token/