You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Optionally sets up automatic refresh behavior if `refreshedSessionTTLSeconds` is provided. This value defines how long each refreshed session will last and must be at least 30 seconds.
* Manually refreshes the selected session. Useful when rotating credentials.
76
74
77
75
### User Management
78
76
@@ -84,6 +82,14 @@ Then in your views, access it via:
84
82
85
83
* Updates the user contact details.
86
84
85
+
*`updateUserEmail(email:verificationToken:)`
86
+
87
+
* Updates the user's email address. If a verification token is provided, the email is marked as verified. Passing an empty string will delete the user's email.
* Updates the user's phone number. If a verification token is provided, the phone number is marked as verified. Passing an empty string will delete the user's phone number.
@@ -129,9 +135,12 @@ public typealias Timestamp = Components.Schemas.external_period_data_period_v1_p
129
135
130
136
## Session Expiry Handling
131
137
132
-
Each session schedules a timer to automatically clear itself 5 seconds before JWT expiry. You can optionally observe session state via `@Published` properties on `TurnkeyContext`:
138
+
Each session schedules a timer to automatically clear itself 5 seconds before JWT expiry. If `refreshedSessionTTLSeconds` was provided when creating the session, the SDK will automatically refresh the session before it expires, as long as the app is active.
139
+
140
+
You can optionally observe session state via `@Published` properties on `TurnkeyContext`:
133
141
134
142
```swift
143
+
@Publishedpublicinternal(set) var authState: AuthState
135
144
@Publishedpublicinternal(set) var selectedSessionKey: String?
136
145
@Publishedpublicinternal(set) var user: SessionUser?
137
146
@Publishedpublicinternal(set) var client: TurnkeyClient?
0 commit comments