@magic-sdk/types
Advanced tools
Comparing version 1.2.0-alpha.0 to 1.2.1-alpha.0
@@ -13,3 +13,3 @@ ## Upcoming Changes | ||
- ... | ||
- Added WebAuthn support types | ||
@@ -16,0 +16,0 @@ ## `1.1.0` - 06/23/2020 |
@@ -6,3 +6,5 @@ export declare enum SDKErrorCode { | ||
InvalidArgument = "INVALID_ARGUMENT", | ||
ExtensionNotInitialized = "EXTENSION_NOT_INITIALIZED" | ||
ExtensionNotInitialized = "EXTENSION_NOT_INITIALIZED", | ||
WebAuthnNotSupported = "WEBAUTHN_NOT_SUPPORTED", | ||
WebAuthnCreateCredentialError = "WEBAUTHN_CREATE_CREDENTIAL_ERROR" | ||
} | ||
@@ -9,0 +11,0 @@ export declare enum SDKWarningCode { |
@@ -37,3 +37,12 @@ import { RPCErrorCode } from './exception-types'; | ||
Logout = "magic_auth_logout", | ||
UpdateEmail = "magic_auth_update_email" | ||
UpdateEmail = "magic_auth_update_email", | ||
WebAuthnRegistrationStart = "magic_auth_webauthn_registration_start", | ||
RegisterWithWebAuth = "magic_auth_webauthn_register", | ||
LoginWithWebAuthn = "magic_auth_login_with_web_authn", | ||
WebAuthnLoginVerfiy = "magic_auth_login_with_webauthn_verify", | ||
GetWebAuthnInfo = "magic_user_get_webauthn_credentials", | ||
UpdateWebAuthnInfo = "magic_user_update_webauthn", | ||
UnregisterWebAuthDevice = "magic_user_unregister_webauthn", | ||
RegisterWebAuthDeviceStart = "magic_auth_register_webauthn_device_start", | ||
RegisterWebAuthDevice = "magic_auth_register_webauthn_device" | ||
} |
@@ -9,2 +9,11 @@ (function (MagicPayloadMethod) { | ||
MagicPayloadMethod["UpdateEmail"] = "magic_auth_update_email"; | ||
MagicPayloadMethod["WebAuthnRegistrationStart"] = "magic_auth_webauthn_registration_start"; | ||
MagicPayloadMethod["RegisterWithWebAuth"] = "magic_auth_webauthn_register"; | ||
MagicPayloadMethod["LoginWithWebAuthn"] = "magic_auth_login_with_web_authn"; | ||
MagicPayloadMethod["WebAuthnLoginVerfiy"] = "magic_auth_login_with_webauthn_verify"; | ||
MagicPayloadMethod["GetWebAuthnInfo"] = "magic_user_get_webauthn_credentials"; | ||
MagicPayloadMethod["UpdateWebAuthnInfo"] = "magic_user_update_webauthn"; | ||
MagicPayloadMethod["UnregisterWebAuthDevice"] = "magic_user_unregister_webauthn"; | ||
MagicPayloadMethod["RegisterWebAuthDeviceStart"] = "magic_auth_register_webauthn_device_start"; | ||
MagicPayloadMethod["RegisterWebAuthDevice"] = "magic_auth_register_webauthn_device"; | ||
})(exports.MagicPayloadMethod || (exports.MagicPayloadMethod = {})); | ||
@@ -30,2 +39,4 @@ | ||
SDKErrorCode["ExtensionNotInitialized"] = "EXTENSION_NOT_INITIALIZED"; | ||
SDKErrorCode["WebAuthnNotSupported"] = "WEBAUTHN_NOT_SUPPORTED"; | ||
SDKErrorCode["WebAuthnCreateCredentialError"] = "WEBAUTHN_CREATE_CREDENTIAL_ERROR"; | ||
})(exports.SDKErrorCode || (exports.SDKErrorCode = {})); | ||
@@ -32,0 +43,0 @@ |
@@ -11,2 +11,11 @@ var MagicPayloadMethod; | ||
MagicPayloadMethod["UpdateEmail"] = "magic_auth_update_email"; | ||
MagicPayloadMethod["WebAuthnRegistrationStart"] = "magic_auth_webauthn_registration_start"; | ||
MagicPayloadMethod["RegisterWithWebAuth"] = "magic_auth_webauthn_register"; | ||
MagicPayloadMethod["LoginWithWebAuthn"] = "magic_auth_login_with_web_authn"; | ||
MagicPayloadMethod["WebAuthnLoginVerfiy"] = "magic_auth_login_with_webauthn_verify"; | ||
MagicPayloadMethod["GetWebAuthnInfo"] = "magic_user_get_webauthn_credentials"; | ||
MagicPayloadMethod["UpdateWebAuthnInfo"] = "magic_user_update_webauthn"; | ||
MagicPayloadMethod["UnregisterWebAuthDevice"] = "magic_user_unregister_webauthn"; | ||
MagicPayloadMethod["RegisterWebAuthDeviceStart"] = "magic_auth_register_webauthn_device_start"; | ||
MagicPayloadMethod["RegisterWebAuthDevice"] = "magic_auth_register_webauthn_device"; | ||
})(MagicPayloadMethod || (MagicPayloadMethod = {})); | ||
@@ -38,2 +47,4 @@ | ||
SDKErrorCode["ExtensionNotInitialized"] = "EXTENSION_NOT_INITIALIZED"; | ||
SDKErrorCode["WebAuthnNotSupported"] = "WEBAUTHN_NOT_SUPPORTED"; | ||
SDKErrorCode["WebAuthnCreateCredentialError"] = "WEBAUTHN_CREATE_CREDENTIAL_ERROR"; | ||
})(SDKErrorCode || (SDKErrorCode = {})); | ||
@@ -40,0 +51,0 @@ |
@@ -11,2 +11,11 @@ var MagicPayloadMethod; | ||
MagicPayloadMethod["UpdateEmail"] = "magic_auth_update_email"; | ||
MagicPayloadMethod["WebAuthnRegistrationStart"] = "magic_auth_webauthn_registration_start"; | ||
MagicPayloadMethod["RegisterWithWebAuth"] = "magic_auth_webauthn_register"; | ||
MagicPayloadMethod["LoginWithWebAuthn"] = "magic_auth_login_with_web_authn"; | ||
MagicPayloadMethod["WebAuthnLoginVerfiy"] = "magic_auth_login_with_webauthn_verify"; | ||
MagicPayloadMethod["GetWebAuthnInfo"] = "magic_user_get_webauthn_credentials"; | ||
MagicPayloadMethod["UpdateWebAuthnInfo"] = "magic_user_update_webauthn"; | ||
MagicPayloadMethod["UnregisterWebAuthDevice"] = "magic_user_unregister_webauthn"; | ||
MagicPayloadMethod["RegisterWebAuthDeviceStart"] = "magic_auth_register_webauthn_device_start"; | ||
MagicPayloadMethod["RegisterWebAuthDevice"] = "magic_auth_register_webauthn_device"; | ||
})(MagicPayloadMethod || (MagicPayloadMethod = {})); | ||
@@ -38,2 +47,4 @@ | ||
SDKErrorCode["ExtensionNotInitialized"] = "EXTENSION_NOT_INITIALIZED"; | ||
SDKErrorCode["WebAuthnNotSupported"] = "WEBAUTHN_NOT_SUPPORTED"; | ||
SDKErrorCode["WebAuthnCreateCredentialError"] = "WEBAUTHN_CREATE_CREDENTIAL_ERROR"; | ||
})(SDKErrorCode || (SDKErrorCode = {})); | ||
@@ -40,0 +51,0 @@ |
@@ -13,1 +13,17 @@ export interface LoginWithMagicLinkConfiguration { | ||
} | ||
export interface RegisterWithWebAuthnConfiguration { | ||
/** | ||
* The username of the user attempting to register. | ||
*/ | ||
username: string; | ||
/** | ||
* The nickname that the user attempts to set to this webauthn device. | ||
*/ | ||
nickname?: string; | ||
} | ||
export interface LoginWithWebAuthnConfiguration { | ||
/** | ||
* The username of the user attempting to register. | ||
*/ | ||
username: string; | ||
} |
@@ -32,1 +32,11 @@ export interface GetIdTokenConfiguration { | ||
} | ||
export interface UpdateWebAuthnInfoConfiguration { | ||
/** | ||
* WebAuthn info id | ||
*/ | ||
id: string; | ||
/** | ||
* nickname that user attempts to update to the webauth device associate to the id. | ||
*/ | ||
nickname: string; | ||
} |
{ | ||
"name": "@magic-sdk/types", | ||
"version": "1.2.0-alpha.0", | ||
"version": "1.2.1-alpha.0", | ||
"description": "Core typings for Magic SDK packages.", | ||
@@ -24,3 +24,3 @@ "author": "Fortmatic <team@fortmatic.com> (https://fortmatic.com/)", | ||
}, | ||
"gitHead": "60dfc87d2b809ce0f806820a8c9d08fd756daf1b" | ||
"gitHead": "d59abcf55f2b99627e55d302bb9c451c01403cf2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
41502
393
0
1