hotfix: magiclink dynamic email redirection url (#67)
* chore: modified magiclink /signin function to work with origin * chore: modified testcases for signInMagicLink to reflect new changes * chore: removed prisma migration file * chore: removed admin module dulicate from guards folder * chore: implemented ENUMs for origins in signin method * chore: added VITE_ADMIN_URL to .env.example file
This commit is contained in:
@@ -77,7 +77,7 @@ const encodedRefreshToken =
|
||||
|
||||
describe('signInMagicLink', () => {
|
||||
test('Should throw error if email is not in valid format', async () => {
|
||||
const result = await authService.signInMagicLink('bbbgmail.com');
|
||||
const result = await authService.signInMagicLink('bbbgmail.com', 'admin');
|
||||
expect(result).toEqualLeft({
|
||||
message: INVALID_EMAIL,
|
||||
statusCode: HttpStatus.BAD_REQUEST,
|
||||
@@ -94,6 +94,7 @@ describe('signInMagicLink', () => {
|
||||
|
||||
const result = await authService.signInMagicLink(
|
||||
'dwight@dundermifflin.com',
|
||||
'admin',
|
||||
);
|
||||
expect(result).toEqualRight({
|
||||
deviceIdentifier: passwordlessData.deviceIdentifier,
|
||||
@@ -108,6 +109,7 @@ describe('signInMagicLink', () => {
|
||||
|
||||
const result = await authService.signInMagicLink(
|
||||
'dwight@dundermifflin.com',
|
||||
'admin',
|
||||
);
|
||||
expect(result).toEqualRight({
|
||||
deviceIdentifier: passwordlessData.deviceIdentifier,
|
||||
|
||||
Reference in New Issue
Block a user