Viktor Nyblom
03/04/2025, 8:49 AMAleksei Tirman [JB]
03/04/2025, 12:08 PMHristijan
03/04/2025, 12:27 PMViktor Nyblom
03/04/2025, 1:22 PMhellman
03/04/2025, 1:32 PMHristijan
03/04/2025, 1:32 PMhellman
03/04/2025, 1:34 PMViktor Nyblom
03/04/2025, 1:44 PMhellman
03/04/2025, 1:47 PMViktor Nyblom
03/04/2025, 2:03 PMHristijan
03/04/2025, 2:10 PM@Serializable
data class SignInUserWithSocialResponseModel(
@SerialName("avatar") var avatar: String? = null,
@SerialName("tokenExpiryDate") val tokenExpiryDate: Long? = null,
@SerialName("email") var email: String,
@SerialName("socialProvider") val socialProvider: String,
@SerialName("providerUserId") val providerUserId: String,
)
this is what i receive in my ktor backend path
i validate the expiration date, you can also pass the social provider access and refresh token and validate them with their respective java sdks
then i create a user based on the email and providerUserId
then i create an access token with refresh token (JWT) based on the user’s details
access token lives 30 days while refresh lives 35 days
after that i have also ktor as a client that just does the refreshment of tokens