Skip to content

A cloud function written in Nodejs for getting authentication tokens for client-side on joining a video call channel.

Notifications You must be signed in to change notification settings

shihabkandil/agora-token-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agora Users' authentication (rtc & rtm tokens generation) Cloud Function.

Prerequisites

Before you begin, ensure you have the following installed:

Getting Started

Follow these steps to get started with the Firebase Cloud Functions:

  1. Clone the Repository: Clone this repository to your local machine.

    git clone https://github.com/shihabkandil/agora-token-function
    cd functions
  2. Install Dependencies: Install the required npm dependencies.

    npm install
  3. Set Up Firebase Project: If you haven't already, initialize Firebase in your project and log in to your Firebase account.

    firebase login

    Initialize Firebase in your project (if not already initialized).

    firebase init functions

    Update Firebase projectId in .firebaserc

    This will set up your Firebase project to deploy cloud functions.

  4. Environment Configuration: Set up your environment variables. You can pass enviroment variables into your deploy command, make sure development account has Cloud Runtime Configuration API enabled.

    firebase functions:secrets:set AGORA_APP_ID
    firebase functions:secrets:set AGORA_CERTIFICATE
  5. Run Cloud Functions Locally: Start the Firebase emulators to run functions locally.

    firebase emulators:start
  6. Deploy to Firebase: Deploy your function only from firebase services to Google Cloud Platform.

    firebase deploy --only functions

Additional Information

About

A cloud function written in Nodejs for getting authentication tokens for client-side on joining a video call channel.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published