Home / Companies / Agora / Blog / Post Details
Content Deep Dive

Connecting to Agora with Tokens — Flutter

Blog post from Agora

Post Details
Company
Date Published
Author
Meherdeep Thakur
Word Count
602
Language
English
Hacker News Points
-
Summary

In this tutorial, we learn how to generate tokens for secure authentication in webRTC applications. Tokens are dynamic keys used when a user joins an RTC channel or logs into an RTM system. They need to be regenerated after a set interval of time (<24 hours). We can use our own server to generate tokens, or we can use the example provided in this tutorial. The token is linked with a channel name and UID, which distinguishes users in the channel. When a user's token is about to expire, Agora provides a callback function that allows us to generate a new token and renew it using the `renewToken()` method.