Skip to content

Commit

Permalink
feat: add Puppeteer.Authenticated.user() method
Browse files Browse the repository at this point in the history
Pulled BBAuthClient.d.ts into datadirect-puppeteer, to further isolate Puppeteer interactions from myschoolapp-reporting
  • Loading branch information
Seth Battis committed Dec 31, 2024
1 parent 69ff66d commit 910eb47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ export class Authenticated extends Base {
);
}

public async user(): Promise<string> {
return await this.page.evaluate(
async () => (await BBAuthClient.BBAuth.getDecodedToken(null)).email
);
}

public async fork(
path: URL | string,
timeout = Authenticated.DefaultTimeout
Expand Down

0 comments on commit 910eb47

Please sign in to comment.