diff --git a/h0 .dTag b/h0 .dTag new file mode 100644 index 0000000..026c072 --- /dev/null +++ b/h0 .dTag @@ -0,0 +1,21 @@ +private fun loginWithBrowser() { + // Setup the WebAuthProvider, using the custom scheme and scope. + + WebAuthProvider.login(account) + .withScheme("demo") + .withScope("openid profile email") + // Launch the authentication passing the callback where the results will be received + .start(this, object : Callback { + // Called when there is an authentication failure + override fun onFailure(exception: AuthenticationException) { + // Something went wrong! + } + + // Called when authentication completed successfully + override fun onSuccess(credentials: Credentials) { + // Get the access token from the credentials object. + // This can be used to call APIs + val accessToken = credentials.accessToken + } + }) +}