j3k0 / ganomede-users

Ganomede Users
0 stars 0 forks source link

Confirm email address #67

Closed j3k0 closed 2 years ago

HusseinTaha commented 2 years ago

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/

{
accessCode: '2rwerr234'
}
j3k0 commented 2 years ago
HusseinTaha commented 2 years ago

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
  }
}