@nexys/oauth
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

OAuth helpers

NPM package NPM package Prettier Build and Test Package Build and Test Package and (publish)

router.get("/sso/red", async (ctx) => {
  ctx.redirect(gh.oAuthUrl());
});

router.get("/sso/github/redirect", async (ctx) => {
  const { code } = ctx.query;
  const token = await gh.callback(code as string);
  const profile = await gh.getProfile(token);
  
  // here connect to the user management
  ctx.body = profile
});

Link to old generic route generator (deleted from the repo, to reduce the amount of dependencies)

Readme

Keywords

none

Package Sidebar

Install

npm i @nexys/oauth

Weekly Downloads

1

Version

0.3.3

License

MIT

Unpacked Size

44.3 kB

Total Files

57

Last publish

Collaborators

  • nexys