@usync/oauth2 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +345 -911
- package/dist/providers/base.d.ts +14 -3
- package/dist/providers/index.d.ts +4 -4
- package/dist/types.d.ts +7 -5
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -4,4 +4,8 @@
|
|
|
4
4
|

|
|
5
5
|
[](https://www.jsdocs.io/package/@usync/oauth2)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
OAuth2 support for provider-based authorization flows and token management.
|
|
8
|
+
|
|
9
|
+
This package focuses on the moving parts around OAuth2: turning provider configuration into authorizers, refreshing access tokens when needed, and completing interactive login flows when a user has not yet authorized access.
|
|
10
|
+
|
|
11
|
+
The design keeps authorization state and token handling separate from drive or sync logic, so storage adapters can reuse the same auth machinery without duplicating protocol code.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OAuth2Authorizer } from
|
|
2
|
-
import { IOAuth2Account, IOAuth2Options } from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
import { OAuth2Authorizer } from "./providers";
|
|
2
|
+
import type { IOAuth2Account, IOAuth2Options } from "./types";
|
|
3
|
+
export * from "./common";
|
|
4
|
+
export * from "./providers";
|
|
5
|
+
export * from "./types";
|
|
6
6
|
export declare function getAuthorizer(options: IOAuth2Options, auth: IOAuth2Account): import("./providers").DropboxAuthorizer | import("./providers").GoogleAuthorizer | import("./providers").MicrosoftAuthorizer;
|
|
7
7
|
export declare function ensureAccessToken(authorizer: OAuth2Authorizer, handleOAuth2?: (url: string) => Promise<string>): Promise<string>;
|