Learn how to authenticate your users with QuickBlox.
Application session token | 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. |
create()
method.
loginWithFirebase()
. The ID token of the Firebase user is received as a result of the getIdToken()
method.
loginWithFirebase()
method.
Fields | 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. |
token | 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.
startSessionWithToken()
method, also before calling the method to get notified that the session has expired you need to add SESSION_EXPIRED listener to NativeEventEmitter. Don’t forget to log in user if you pass the application token.
setSession()
method.setSession()
method accepts one argument of the object type that has the following fields:
Field | Required | Description |
---|---|---|
applicationId | yes | Application ID. |
token | yes | QuickBlox session token. |
userId | yes | User ID. |
init()
method before calling the setSession()
method. If you attempt to call the method without initializing SDK previously, the error will be returned.