Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelDeMartin committed Feb 20, 2025
1 parent bee09d4 commit 0879a7a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@aerogel/plugin-soukai": "0.0.0-next.f9394854509d71d644498ac087706a2f8f8eea1c",
"@intlify/unplugin-vue-i18n": "^0.12.2",
"@muze-nl/metro": "^0.6.5",
"@muze-nl/metro-oidc": "^0.3.5",
"@muze-nl/metro-oidc": "^0.4.0",
"@noeldemartin/utils": "0.5.1-next.8877300615e6d56d7b5dfe508524589287835f23",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
Expand Down
17 changes: 12 additions & 5 deletions src/auth/MetroAuthenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AerogelSolid from 'virtual:aerogel-solid';
import metro from '@muze-nl/metro';

Check failure on line 3 in src/auth/MetroAuthenticator.ts

View workflow job for this annotation

GitHub Actions / ci

Could not find a declaration file for module '@muze-nl/metro'. '/home/runner/work/ramen/ramen/node_modules/@muze-nl/metro/src/everything.mjs' implicitly has an 'any' type.
import metroOidc from '@muze-nl/metro-oidc';

Check failure on line 4 in src/auth/MetroAuthenticator.ts

View workflow job for this annotation

GitHub Actions / ci

Could not find a declaration file for module '@muze-nl/metro-oidc'. '/home/runner/work/ramen/ramen/node_modules/@muze-nl/metro-oidc/src/browser.mjs' implicitly has an 'any' type.
import { Authenticator, Solid } from '@aerogel/plugin-solid';
import { after, required } from '@noeldemartin/utils';
import { required } from '@noeldemartin/utils';
import type { AuthSession } from '@aerogel/plugin-solid';
import type { ClosureArgs } from '@noeldemartin/utils';
import type { Reactive } from 'vue';
Expand Down Expand Up @@ -33,13 +33,20 @@ export default class MetroAuthenticator extends Authenticator {
this.store.webId = user?.webId;
this.store.issuer = issuer;

// TODO there is probably a better way to trigger the redirect...
// Trigger authentication if necessary
await client.get(user?.storageUrls[0] + 'this-does-not-exist');

// Browser should redirect, so just make it wait for a while.
await after({ seconds: 60 });
// Log in
const session: AuthSession = {
user: await Solid.requireUserProfile(required(this.store.webId)),
loginUrl: required(this.store.issuer),
authenticator: this,
};

await this.initAuthenticatedFetch((...args: ClosureArgs) => client.fetch(...args));
await this.startSession(session);

throw new Error('Browser should have redirected, but it didn\'t');
return session;
}

public async logout(): Promise<void> {
Expand Down

0 comments on commit 0879a7a

Please sign in to comment.