@koolbase/core 11.3.0 → 11.4.0
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/dist/cjs/auth.d.ts +15 -0
- package/dist/cjs/auth.js +21 -0
- package/dist/esm/auth.d.ts +15 -0
- package/dist/esm/auth.js +21 -0
- package/package.json +1 -1
package/dist/cjs/auth.d.ts
CHANGED
|
@@ -154,6 +154,21 @@ export declare class KoolbaseAuth {
|
|
|
154
154
|
private _doRefresh;
|
|
155
155
|
logout(): Promise<boolean>;
|
|
156
156
|
forgotPassword(email: string): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Ask for a new verification email, with no session.
|
|
159
|
+
*
|
|
160
|
+
* For the state a project with verified contact required creates:
|
|
161
|
+
* registered, unverified, refused at login, and holding a link that may
|
|
162
|
+
* never have arrived or has since expired. `resendVerificationEmail()`
|
|
163
|
+
* cannot help there — it needs a session the user cannot get.
|
|
164
|
+
*
|
|
165
|
+
* Returns nothing, and throws only on a malformed request, because the
|
|
166
|
+
* server answers identically whether the address has an account, has none,
|
|
167
|
+
* or is already verified. Anything else would let anyone discover who has
|
|
168
|
+
* signed up. So there is no "we sent it" to report: show the same "check
|
|
169
|
+
* your email" either way.
|
|
170
|
+
*/
|
|
171
|
+
resendVerificationEmailToAddress(email: string): Promise<void>;
|
|
157
172
|
resetPassword(token: string, password: string): Promise<void>;
|
|
158
173
|
/**
|
|
159
174
|
* Complete email verification with a token from a verification link.
|
package/dist/cjs/auth.js
CHANGED
|
@@ -519,6 +519,27 @@ class KoolbaseAuth {
|
|
|
519
519
|
});
|
|
520
520
|
await this.checkResponse(res);
|
|
521
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* Ask for a new verification email, with no session.
|
|
524
|
+
*
|
|
525
|
+
* For the state a project with verified contact required creates:
|
|
526
|
+
* registered, unverified, refused at login, and holding a link that may
|
|
527
|
+
* never have arrived or has since expired. `resendVerificationEmail()`
|
|
528
|
+
* cannot help there — it needs a session the user cannot get.
|
|
529
|
+
*
|
|
530
|
+
* Returns nothing, and throws only on a malformed request, because the
|
|
531
|
+
* server answers identically whether the address has an account, has none,
|
|
532
|
+
* or is already verified. Anything else would let anyone discover who has
|
|
533
|
+
* signed up. So there is no "we sent it" to report: show the same "check
|
|
534
|
+
* your email" either way.
|
|
535
|
+
*/
|
|
536
|
+
async resendVerificationEmailToAddress(email) {
|
|
537
|
+
const res = await this.authRequest('/v1/sdk/auth/resend-verification/by-email', {
|
|
538
|
+
method: 'POST',
|
|
539
|
+
body: { email },
|
|
540
|
+
});
|
|
541
|
+
await this.checkResponse(res);
|
|
542
|
+
}
|
|
522
543
|
async resetPassword(token, password) {
|
|
523
544
|
const res = await this.authRequest('/v1/sdk/auth/password-reset/confirm', {
|
|
524
545
|
method: 'POST',
|
package/dist/esm/auth.d.ts
CHANGED
|
@@ -154,6 +154,21 @@ export declare class KoolbaseAuth {
|
|
|
154
154
|
private _doRefresh;
|
|
155
155
|
logout(): Promise<boolean>;
|
|
156
156
|
forgotPassword(email: string): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Ask for a new verification email, with no session.
|
|
159
|
+
*
|
|
160
|
+
* For the state a project with verified contact required creates:
|
|
161
|
+
* registered, unverified, refused at login, and holding a link that may
|
|
162
|
+
* never have arrived or has since expired. `resendVerificationEmail()`
|
|
163
|
+
* cannot help there — it needs a session the user cannot get.
|
|
164
|
+
*
|
|
165
|
+
* Returns nothing, and throws only on a malformed request, because the
|
|
166
|
+
* server answers identically whether the address has an account, has none,
|
|
167
|
+
* or is already verified. Anything else would let anyone discover who has
|
|
168
|
+
* signed up. So there is no "we sent it" to report: show the same "check
|
|
169
|
+
* your email" either way.
|
|
170
|
+
*/
|
|
171
|
+
resendVerificationEmailToAddress(email: string): Promise<void>;
|
|
157
172
|
resetPassword(token: string, password: string): Promise<void>;
|
|
158
173
|
/**
|
|
159
174
|
* Complete email verification with a token from a verification link.
|
package/dist/esm/auth.js
CHANGED
|
@@ -516,6 +516,27 @@ export class KoolbaseAuth {
|
|
|
516
516
|
});
|
|
517
517
|
await this.checkResponse(res);
|
|
518
518
|
}
|
|
519
|
+
/**
|
|
520
|
+
* Ask for a new verification email, with no session.
|
|
521
|
+
*
|
|
522
|
+
* For the state a project with verified contact required creates:
|
|
523
|
+
* registered, unverified, refused at login, and holding a link that may
|
|
524
|
+
* never have arrived or has since expired. `resendVerificationEmail()`
|
|
525
|
+
* cannot help there — it needs a session the user cannot get.
|
|
526
|
+
*
|
|
527
|
+
* Returns nothing, and throws only on a malformed request, because the
|
|
528
|
+
* server answers identically whether the address has an account, has none,
|
|
529
|
+
* or is already verified. Anything else would let anyone discover who has
|
|
530
|
+
* signed up. So there is no "we sent it" to report: show the same "check
|
|
531
|
+
* your email" either way.
|
|
532
|
+
*/
|
|
533
|
+
async resendVerificationEmailToAddress(email) {
|
|
534
|
+
const res = await this.authRequest('/v1/sdk/auth/resend-verification/by-email', {
|
|
535
|
+
method: 'POST',
|
|
536
|
+
body: { email },
|
|
537
|
+
});
|
|
538
|
+
await this.checkResponse(res);
|
|
539
|
+
}
|
|
519
540
|
async resetPassword(token, password) {
|
|
520
541
|
const res = await this.authRequest('/v1/sdk/auth/password-reset/confirm', {
|
|
521
542
|
method: 'POST',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/core",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"description": "Koolbase SDK core \u2014 shared behaviour behind @koolbase/react-native and @koolbase/js. Install one of those, not this.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|