You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 3, 2019. It is now read-only.
feat(codes): add support for verifying token short code (#287) r=@vladikoff,@rfk
This PR exposes new APIs to create and verify sessionTokens using a short code. Couple notes
- Each code has an expiration date
- Codes are stored as hashes in database
- Support for resending (aka regenerating) a code to come in later PR.
- New endpoint `verifyTokensShortCode` used to explicitly verify shortCodes.
Connects with mozilla/fxa-auth-server#2218
Feature doc: https://docs.google.com/document/d/1xQtCGBJ9XZuF1q9faZV3YIiOnxomQMHKiTP62YSf3v8/edit
assert.equal(session.mustVerify,sessionToken.mustVerify,'mustVerify must match sessionToken')
2604
+
assert.equal(session.tokenVerificationId.toString('hex'),sessionToken.tokenVerificationId.toString('hex'),'tokenVerificationId must match sessionToken')
assert.equal(session.tokenVerificationCodeExpiresAt,sessionToken.tokenVerificationCodeExpiresAt,'tokenVerificationCodeExpiresAt must match sessionToken')
0 commit comments