updated api preview examples
This commit is contained in:
@@ -20,6 +20,10 @@ export function docsAuthWithOTP(collection) {
|
||||
},
|
||||
// description
|
||||
t.p(null, "Authenticate with an one-time/short-lived password (OTP)."),
|
||||
t.p(
|
||||
null,
|
||||
"On successful authentication the user will be also marked as verified (if the OTP source is email and the user is not verified already).",
|
||||
),
|
||||
t.p(
|
||||
null,
|
||||
"Note that when requesting an OTP we return an ",
|
||||
|
||||
@@ -19,7 +19,7 @@ export function docsEmailChange(collection) {
|
||||
t.p(null, `Sends ${collection.name} email change request.`),
|
||||
t.p(
|
||||
null,
|
||||
"On successful email change all previously issued auth tokens for the specific record will be automatically invalidated.",
|
||||
"On successful email change all previously issued auth tokens for the specific record will be invalidated (and the user will be marked as verified if not already).",
|
||||
),
|
||||
app.components.codeBlockTabs({
|
||||
className: "sdk-examples m-t-sm",
|
||||
@@ -46,7 +46,8 @@ export function docsEmailChange(collection) {
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
// note: all previous user auth tokens will be invalidated
|
||||
// (and the user will be marked as verified if not already)
|
||||
await pb.collection('${collection.name}').confirmEmailChange(
|
||||
'EMAIL_CHANGE_TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
@@ -83,7 +84,8 @@ export function docsEmailChange(collection) {
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
// note: all previous user auth tokens will be invalidated
|
||||
// (and the user will be marked as verified if not already)
|
||||
await pb.collection('${collection.name}').confirmEmailChange(
|
||||
'EMAIL_CHANGE_TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
@@ -111,6 +113,9 @@ export function docsEmailChange(collection) {
|
||||
'${baseURL}/api/collections/${collection.name}/request-email-change'
|
||||
|
||||
# Confirm email change
|
||||
#
|
||||
# note: all previous user auth tokens will be invalidated
|
||||
# (and the user will be marked as verified if not already)
|
||||
curl -X POST \\
|
||||
-H 'Content-Type:application/json' \\
|
||||
-d '{ "token":"...", "password":"" }' \\
|
||||
|
||||
@@ -19,7 +19,7 @@ export function docsPasswordReset(collection) {
|
||||
t.p(null, `Sends ${collection.name} password reset email request.`),
|
||||
t.p(
|
||||
null,
|
||||
"On successful password reset all previously issued auth tokens for the specific record will be automatically invalidated.",
|
||||
"On successful password reset all previously issued auth tokens for the specific record will be invalidated (and the user will be marked as verified if not already).",
|
||||
),
|
||||
app.components.codeBlockTabs({
|
||||
className: "sdk-examples m-t-sm",
|
||||
@@ -41,7 +41,8 @@ export function docsPasswordReset(collection) {
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
// note: all previous user auth tokens will be invalidated
|
||||
// (and the user will be marked as verified if not already)
|
||||
await pb.collection('${collection.name}').confirmPasswordReset(
|
||||
'RESET_TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
@@ -74,7 +75,8 @@ export function docsPasswordReset(collection) {
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
// note: all previous user auth tokens will be invalidated
|
||||
// (and the user will be marked as verified if not already)
|
||||
await pb.collection('${collection.name}').confirmPasswordReset(
|
||||
'RESET_TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
@@ -102,6 +104,9 @@ export function docsPasswordReset(collection) {
|
||||
'${baseURL}/api/collections/${collection.name}/request-password-reset'
|
||||
|
||||
# Confirm password reset
|
||||
#
|
||||
# note: all previous user auth tokens will be invalidated
|
||||
# (and the user will be marked as verified if not already)
|
||||
curl -X POST \\
|
||||
-H 'Content-Type:application/json' \\
|
||||
-d '{ "token":"...", "password":"", "passwordConfirm":"" }' \\
|
||||
|
||||
Reference in New Issue
Block a user