UNPKG

@ioloco/oauth

Version:

OAuth 2.0 utility library that provides helper functions for integrating third-party login providers. Designed to simplify the token exchange and user-fetch flows, while leaving API route implementation to the developer.

1 lines 266 B
import{OAuthClient as t}from"./AuthClient.js";const n=new Map;function r(r,o){const e=new t(o);n.set(r,e)}function o(t){const r=n.get(t);if(!r)throw new Error(`OAuth provider "${t}" is not registered`);return r}export{o as getOAuthClient,r as registerOAuthProvider};