Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Save Session Data Upon Successful Login
class LoginActivity : AppCompatActivity() {
...
fun authenticate() {
...
if (session?.token != null) {
//HERE'S WHERE WE SAVE THE SESSION DAA
saveSessionData(session!!.name, session!!.token)
startActivity(Intent(this@LoginActivity, MainActivity::class.java))
} else {
deliverAuthFailureMessage()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.