updateMagicURLSession method
Update magic URL session
Use this endpoint to create a session from token. Provide the userId and secret parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
Implementation
Future<models.Session> updateMagicURLSession(
{required String userId, required String secret}) async {
const String apiPath = '/account/sessions/magic-url';
final Map<String, dynamic> apiParams = {
'userId': userId,
'secret': secret,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
return models.Session.fromMap(res.data);
}