yenile
Kullanıcı tokenlerini güncelle.
Açıklama
Bu yöntem kullanıcının tokenini günceller. Bir dizi token ile bir nesne döner. Bir IAuthEntity nesnesine çözülmekte olan bir Promise döner.
AuthProvider.refresh(
marker*,
token*
);
Parametreler şeması
Şema
marker(zorunlu): string
Yetkilendirme sağlayıcısının metin tanımlayıcısı
örnek: "email"
token(zorunlu): string
Yenileme tokeni
örnek: "abcdef123456"
Örnekler
Minimal örnek
const response = await AuthProvider.refresh('email', '1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9');
Örnek yanıt
{
"userIdentifier": "test@test.ru",
"authProviderIdentifier": "email",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX...",
"refreshToken": "1776262770861-52e50bf6-5068-48b1..."
}
Yanıt şeması
Şema: IAuthEntity
userIdentifier: string
Kullanıcı için benzersiz tanımlayıcı.
örnek: "user12345"
authProviderIdentifier: string
Kimlik doğrulama sağlayıcısının tanımlayıcısı.
örnek: "email"
accessToken: string
Kullanıcı oturumu için erişim tokeni.
örnek: "abcdef123456"
refreshToken: string
Erişim tokenini yenilemek için yenileme tokeni.
örnek: "ghijkl789012"