Learn how to authenticate your users with QuickBlox.
Session Token Type | Description |
---|---|
Application session token | This kind of access token is needed to read the app data. Has only READ access to resources. The expiration time after the last REST API request is 2 hours. |
User session token | The user token is the most commonly used type of token. This kind of access token is needed any time the app calls an API to read, modify or write a specific user’s data on their behalf. Has READ/WRITE access to resources. The expiration time after the last REST API request is 2 hours. |
setAutoCreateSession()
method and pass false
as its argument to disable the functionality.
QBSessionManager
class and SessionListener
listener.
signUp()
method.
Parameters | Description |
---|---|
provider | A social network provider. |
accessToken | An access token received from the social network after a user authenticates with it. |
accessTokenSecret | A social network provider’s access token secret. |
PhoneAuthCredential
object, etc. Refer this Firebase document for more details.
To log in the user to QuickBlox, use the signInUsingFirebase()
method. Pass the project ID and ID token to the signInUsingFirebase()
. The ID token is received as a result of the getIdToken()
method.
signInUsingFirebase()
method.
Arguments | Description |
---|---|
firebaseProjectID | Firebase project ID. When you create a Firebase project, Firebase automatically assigns a unique ID to the project, but you can edit it during the project setup. |
firebaseAccessToken | ID token of the Firebase user. Created by Firebase when a user signs in to an app. This token is received as a result of getIdToken() method. |
logout()
method.
QBAuth.startSessionWithToken()
method, also before calling the method to get notified that the session has expired you need to add QBSessionListenerImpl() to QBSessionManager. Don’t forget to [log in user](/sdks/android-authentication #log-in-user) if you pass the application token.
createActiveSession()
method.