@privy-io/js-sdk-core
Advanced tools
Comparing version 0.3.0 to 0.4.0-beta-20230929211018
@@ -0,1 +1,2 @@ | ||
import { OAuthProviderType } from "@privy-io/public-api"; | ||
import EventEmitter from "eventemitter3"; | ||
@@ -42,2 +43,34 @@ interface Storage { | ||
} | ||
declare class OAuthApi { | ||
#private; | ||
/** | ||
* Starts an OAuth flow with a specific provider | ||
* Sends a one time login code to a user's email address | ||
* | ||
* @param provider The OAuth provider | ||
* @param redirectURI The URL to redirect to after a successful OAuth flow | ||
*/ | ||
generateURL(provider: OAuthProviderType, redirectURI: string): Promise<import("@privy-io/public-api").PrivyOAuthInitResponse>; | ||
/** | ||
* Logs a user in via successfull OAuth flow codes | ||
* | ||
* @param authorizationCode The code generated by the authorization server | ||
* @param stateCode The state value initially set in the request by Privy to the authorization server | ||
*/ | ||
loginWithCode(authorizationCode: string, stateCode: string): Promise<import("@privy-io/public-api").PrivyAuthenticatedUser>; | ||
/** | ||
* Links an OAuth account to an existing user | ||
* | ||
* @param authorizationCode The code generated by the authorization server | ||
* @param stateCode The state value initially set in the request by Privy to the authorization server | ||
*/ | ||
linkWithCode(authorizationCode: string, stateCode: string): Promise<import("@privy-io/public-api").PrivyUser>; | ||
/** | ||
* Un-links an OAuth account from an existing user | ||
* | ||
* @param provider The OAuth provider | ||
* @param subject The subject of the OAuth account, usually an email or username | ||
*/ | ||
unlink(provider: OAuthProviderType, subject: string): Promise<import("@privy-io/public-api").PrivyUser>; | ||
} | ||
declare class PhoneApi { | ||
@@ -83,2 +116,6 @@ #private; | ||
/** | ||
* APIs for login with OAuth | ||
*/ | ||
readonly oauth: OAuthApi; | ||
/** | ||
* Logs the current user out. | ||
@@ -85,0 +122,0 @@ */ |
{ | ||
"name": "@privy-io/js-sdk-core", | ||
"version": "0.3.0", | ||
"version": "0.4.0-beta-20230929211018", | ||
"description": "Vanilla JS client for the Privy Auth API", | ||
@@ -61,3 +61,3 @@ "keywords": [ | ||
"@ethersproject/providers": "^5.7.2", | ||
"@privy-io/public-api": "*", | ||
"@privy-io/public-api": "1.3.0-beta-20230929211018", | ||
"eventemitter3": "^5.0.1", | ||
@@ -64,0 +64,0 @@ "fetch-retry": "^5.0.6", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
183950
4506
0
+ Added@privy-io/public-api@1.3.0-beta-20230929211018(transitive)
+ Addedlibphonenumber-js@1.11.18(transitive)
- Removed@privy-io/public-api@2.18.5(transitive)
- Removedbase-x@4.0.0(transitive)
- Removedbs58@5.0.0(transitive)
- Removedlibphonenumber-js@1.11.19(transitive)