Commit 3b07a1ed authored by David Burke's avatar David Burke

Added backup code in registration service

parent 63cefaad
Pipeline #29753822 passed with stage
in 6 minutes and 19 seconds
......@@ -174,11 +174,7 @@ export class UserService {
* create user post to sdk
* pass email and password to sdk to register user
*/
public register(
email: string,
password: string,
rememberMe: boolean
): Promise<IAuthStore> {
public register(email: string, password: string, rememberMe: boolean) {
return this.sdk
.sign_up(email, password)
.then(resp => {
......@@ -193,7 +189,10 @@ export class UserService {
};
this.setUp(auth);
return auth;
return {
...auth,
backupCode: resp.backupCode
};
})
.catch(err => {
throw new Error(err);
......
......@@ -414,6 +414,10 @@
dependencies:
"@types/jasmine" "*"
"@types/libsodium-wrappers@^0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@types/libsodium-wrappers/-/libsodium-wrappers-0.7.0.tgz#0ed83d9151b61c76bb579d4da5146bd503c47303"
"@types/mousetrap@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@types/mousetrap/-/mousetrap-1.6.0.tgz#c3951ab98b88ff6093cd0b1e4f8591af439141b8"
......@@ -6786,11 +6790,11 @@ pascalcase@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
passit-sdk-js@2.2.7:
version "2.2.7"
resolved "https://registry.yarnpkg.com/passit-sdk-js/-/passit-sdk-js-2.2.7.tgz#6ff8f7e551b4d8282eb04b69575ef2bf37093e5d"
passit-sdk-js@2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/passit-sdk-js/-/passit-sdk-js-2.3.0.tgz#bb7bb44b8ecc8db7cbbf3ffff4f4b86bb181fa3a"
dependencies:
simple-asymmetric-js "~0.6.6"
simple-asymmetric-js "~0.7.1"
path-browserify@0.0.0:
version "0.0.0"
......@@ -8081,10 +8085,11 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
simple-asymmetric-js@~0.6.6:
version "0.6.6"
resolved "https://registry.yarnpkg.com/simple-asymmetric-js/-/simple-asymmetric-js-0.6.6.tgz#916690c3784a27c3e9c749d9b8617a1a3bec0eb9"
simple-asymmetric-js@~0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/simple-asymmetric-js/-/simple-asymmetric-js-0.7.1.tgz#687a95271363feecc527963a55dc9e9a3d148e41"
dependencies:
"@types/libsodium-wrappers" "^0.7.0"
libsodium "https://gitlab.com/passit/simple-asymmetric-js/raw/f41a1a7bc4d44e74379f08c72726e0e33473d59e/libsodium-0.7.3.tgz"
libsodium-wrappers "https://gitlab.com/passit/simple-asymmetric-js/raw/f41a1a7bc4d44e74379f08c72726e0e33473d59e/libsodium-wrappers-0.7.3.tgz"
text-encoding-utf-8 "^1.0.2"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment