mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
Merge pull request #1805 from logto-io/renovate/logto-node-1.x
chore(deps): update dependency @logto/node to v1.0.0-beta.3
This commit is contained in:
commit
cfa67cae57
8 changed files with 26 additions and 26 deletions
|
@ -16,4 +16,4 @@ global.TextDecoder = TextDecoder;
|
|||
global.TextEncoder = TextEncoder;
|
||||
/* eslint-enable @silverhand/fp/no-mutation */
|
||||
|
||||
jest.setTimeout(10_000);
|
||||
jest.setTimeout(60_000);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^28.1.3",
|
||||
"@logto/node": "1.0.0-beta.2",
|
||||
"@logto/node": "1.0.0-beta.3",
|
||||
"@logto/schemas": "^1.0.0-beta.8",
|
||||
"@peculiar/webcrypto": "^1.3.3",
|
||||
"@silverhand/eslint-config": "1.0.0",
|
||||
|
|
|
@ -91,11 +91,11 @@ export default class MockClient {
|
|||
return this.logto.signOut(postSignOutRedirectUri);
|
||||
}
|
||||
|
||||
public get isAuthenticated() {
|
||||
return this.logto.isAuthenticated;
|
||||
public async isAuthenticated() {
|
||||
return this.logto.isAuthenticated();
|
||||
}
|
||||
|
||||
public getIdTokenClaims() {
|
||||
public async getIdTokenClaims() {
|
||||
return this.logto.getIdTokenClaims();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,15 +9,15 @@ export class MemoryStorage implements Storage {
|
|||
signInSession: null,
|
||||
};
|
||||
|
||||
getItem(key: StorageKey): Nullable<string> {
|
||||
async getItem(key: StorageKey): Promise<Nullable<string>> {
|
||||
return this.storage[key];
|
||||
}
|
||||
|
||||
setItem(key: StorageKey, value: string): void {
|
||||
async setItem(key: StorageKey, value: string): Promise<void> {
|
||||
this.storage[key] = value;
|
||||
}
|
||||
|
||||
removeItem(key: StorageKey): void {
|
||||
async removeItem(key: StorageKey): Promise<void> {
|
||||
this.storage[key] = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ export const bindSocialToNewCreatedUser = async () => {
|
|||
|
||||
await client.processSession(redirectTo);
|
||||
|
||||
const { sub } = client.getIdTokenClaims();
|
||||
const { sub } = await client.getIdTokenClaims();
|
||||
|
||||
return sub;
|
||||
};
|
||||
|
|
|
@ -76,7 +76,7 @@ describe('email passwordless flow', () => {
|
|||
|
||||
await client.processSession(redirectTo);
|
||||
|
||||
expect(client.isAuthenticated).toBeTruthy();
|
||||
await expect(client.isAuthenticated()).resolves.toBe(true);
|
||||
});
|
||||
|
||||
it('sign-in with email', async () => {
|
||||
|
@ -106,7 +106,7 @@ describe('email passwordless flow', () => {
|
|||
|
||||
await client.processSession(redirectTo);
|
||||
|
||||
expect(client.isAuthenticated).toBeTruthy();
|
||||
await expect(client.isAuthenticated()).resolves.toBe(true);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@ -149,7 +149,7 @@ describe('sms passwordless flow', () => {
|
|||
|
||||
await client.processSession(redirectTo);
|
||||
|
||||
expect(client.isAuthenticated).toBeTruthy();
|
||||
await expect(client.isAuthenticated()).resolves.toBe(true);
|
||||
});
|
||||
|
||||
it('sign-in with sms', async () => {
|
||||
|
@ -179,7 +179,7 @@ describe('sms passwordless flow', () => {
|
|||
|
||||
await client.processSession(redirectTo);
|
||||
|
||||
expect(client.isAuthenticated).toBeTruthy();
|
||||
await expect(client.isAuthenticated()).resolves.toBe(true);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@ -209,10 +209,10 @@ describe('sign-in and sign-out', () => {
|
|||
|
||||
await client.processSession(redirectTo);
|
||||
|
||||
expect(client.isAuthenticated).toBe(true);
|
||||
await expect(client.isAuthenticated()).resolves.toBe(true);
|
||||
|
||||
await client.signOut();
|
||||
|
||||
expect(client.isAuthenticated).toBe(false);
|
||||
await expect(client.isAuthenticated()).resolves.toBe(false);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -61,7 +61,7 @@ describe('social sign-in and register', () => {
|
|||
|
||||
await client.processSession(redirectTo);
|
||||
|
||||
expect(client.isAuthenticated).toBeTruthy();
|
||||
await expect(client.isAuthenticated()).resolves.toBe(true);
|
||||
});
|
||||
|
||||
/*
|
||||
|
@ -91,7 +91,7 @@ describe('social sign-in and register', () => {
|
|||
|
||||
await client.processSession(redirectTo);
|
||||
|
||||
expect(client.isAuthenticated).toBeTruthy();
|
||||
await expect(client.isAuthenticated()).resolves.toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -137,7 +137,7 @@ describe('social bind account', () => {
|
|||
await client.processSession(redirectTo);
|
||||
|
||||
// User should bind with social identities
|
||||
const { sub } = client.getIdTokenClaims();
|
||||
const { sub } = await client.getIdTokenClaims();
|
||||
const user = await getUser(sub);
|
||||
|
||||
expect(user.identities).toHaveProperty(mockSocialConnectorTarget);
|
||||
|
|
|
@ -381,7 +381,7 @@ importers:
|
|||
packages/integration-tests:
|
||||
specifiers:
|
||||
'@jest/types': ^28.1.3
|
||||
'@logto/node': 1.0.0-beta.2
|
||||
'@logto/node': 1.0.0-beta.3
|
||||
'@logto/schemas': ^1.0.0-beta.8
|
||||
'@peculiar/webcrypto': ^1.3.3
|
||||
'@silverhand/eslint-config': 1.0.0
|
||||
|
@ -406,7 +406,7 @@ importers:
|
|||
typescript: ^4.7.4
|
||||
devDependencies:
|
||||
'@jest/types': 28.1.3
|
||||
'@logto/node': 1.0.0-beta.2
|
||||
'@logto/node': 1.0.0-beta.3
|
||||
'@logto/schemas': link:../schemas
|
||||
'@peculiar/webcrypto': 1.3.3
|
||||
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
|
||||
|
@ -2452,13 +2452,13 @@ packages:
|
|||
/@logto/browser/1.0.0-beta.2:
|
||||
resolution: {integrity: sha512-CdXNfauE4Nf2AkRwZO4IH0Dlyx7PDQAFvtzpqEaszRKuFY0yuMi8H9QvtCoNxhuhxDnP3pwHKks6HFTBPT6EGw==}
|
||||
dependencies:
|
||||
'@logto/client': 1.0.0-beta.2
|
||||
'@logto/client': 1.0.0-beta.3
|
||||
'@silverhand/essentials': 1.2.0
|
||||
js-base64: 3.7.2
|
||||
dev: true
|
||||
|
||||
/@logto/client/1.0.0-beta.2:
|
||||
resolution: {integrity: sha512-YUOxmd+C5hdd13KvmxHUVQfb/x70e2Oem5RSfSi58yzu+er97jSv6egsugmgab9EYf68BHB+tTJCKcJSJEirwA==}
|
||||
/@logto/client/1.0.0-beta.3:
|
||||
resolution: {integrity: sha512-Qf22vvl/DqcfFz3y7WgyoPNehKT4Z8BJ8yIwHGrBDdrBhIB4Zd5n+4D3hoVELtKXPWsSKmsbNcL1Q3UA2hRZ2g==}
|
||||
dependencies:
|
||||
'@logto/js': 1.0.0-beta.2
|
||||
'@silverhand/essentials': 1.2.0
|
||||
|
@ -2479,10 +2479,10 @@ packages:
|
|||
superstruct: 0.16.0
|
||||
dev: true
|
||||
|
||||
/@logto/node/1.0.0-beta.2:
|
||||
resolution: {integrity: sha512-O8iSEaJ8ErS43t2SgYutx1ZYDDpSN87EpJu+9z5TtPFR61Xq5HygASPWo5ka5vGTjwh1Yojf+fpN/QwP4flQ7w==}
|
||||
/@logto/node/1.0.0-beta.3:
|
||||
resolution: {integrity: sha512-ajboUnMWSINfgYaEQtUfBF0t3AI/l8Cg6Dk0iPYfErnTYf7W4EuosBDAnXiU9VdHSUSmysHwJRFIoY9WwpKQ1A==}
|
||||
dependencies:
|
||||
'@logto/client': 1.0.0-beta.2
|
||||
'@logto/client': 1.0.0-beta.3
|
||||
'@silverhand/essentials': 1.2.0
|
||||
js-base64: 3.7.2
|
||||
node-fetch: 2.6.7
|
||||
|
|
Loading…
Reference in a new issue