-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -303,7 +303,7 @@ Authenticate users using a password. | |
To create a new user that can later sign in with a password: | ||
|
||
```swift | ||
let authResponse = try await descope.password.signUp(loginId: "[email protected]", password: "securePassword123!", details: SignUpDetails( | ||
let authResponse = try await Descope.password.signUp(loginId: "[email protected]", password: "securePassword123!", details: SignUpDetails( | ||
name: "Andy Rhoads" | ||
)) | ||
``` | ||
|
@@ -313,29 +313,29 @@ let authResponse = try await descope.password.signUp(loginId: "[email protected]" | |
Authenticate an existing user using a password: | ||
|
||
```swift | ||
let authResponse = try await descope.password.signIn(loginId: "[email protected]", password: "securePassword123") | ||
let authResponse = try await Descope.password.signIn(loginId: "[email protected]", password: "securePassword123") | ||
``` | ||
|
||
#### Update Password | ||
|
||
If you need to update a user's password: | ||
|
||
```swift | ||
try await descope.password.update(loginId: "[email protected]", newPassword: "newSecurePassword456", refreshJwt: "yourRefreshJWT") | ||
try await Descope.password.update(loginId: "[email protected]", newPassword: "newSecurePassword456", refreshJwt: "yourRefreshJWT") | ||
``` | ||
|
||
#### Replace Password | ||
|
||
To replace a user's password by providing their current password: | ||
|
||
```swift | ||
let authResponse = try await descope.password.replace(loginId: "[email protected]", oldPassword: "SecurePassword123!", newPassword: "NewSecurePassword456!") | ||
let authResponse = try await Descope.password.replace(loginId: "[email protected]", oldPassword: "SecurePassword123!", newPassword: "NewSecurePassword456!") | ||
``` | ||
|
||
#### Send Password Reset Email | ||
|
||
Initiate a password reset by sending an email: | ||
|
||
```swift | ||
try await descope.password.sendReset(loginId: "[email protected]", redirectURL: "exampleauthschema://my-app.com/handle-reset") | ||
try await Descope.password.sendReset(loginId: "[email protected]", redirectURL: "exampleauthschema://my-app.com/handle-reset") | ||
``` |