You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/Flutter/03-core-concepts/01-authentication.mdx
+56-46Lines changed: 56 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,50 +12,66 @@ Before users are able to join or create a call, the client must first be configu
12
12
The initialization constructor for `StreamVideo` also exposes many customization options which can be overridden based on the project needs such as the logging level, SDP policy, retry policy, etc.
All tokens must be generated via a backend SDK and cannot be created from a frontend client. This step is typically included whenever a new user is registered on your backend.
28
41
29
-
There are a few ways in which users can connect using our SDK. We support both long lived tokens and dynamic tokens via two constructors accessible on the `StreamVideo` class:
42
+
There are a few ways in which users can connect using our SDK. We support both long lived tokens and dynamic tokens via two parameters accessible on the `StreamVideo` class:
For situations where your backend does not require tokens to be refreshed, `connectUser`can be used by simply passing in a `UserInfo` object and the token as a `String`.
47
+
For situations where your backend does not require tokens to be refreshed, the first variant can be used by simply passing in a `User` object and the `userToken` as a `String`.
35
48
36
49
*Dynamic tokens*
37
50
38
-
Using `connectUserWithProvider`, a Token Provider can be used to dynamically load a token from a server. On expiration, the SDK automatically calls the Token Provider to obtain a new token.
51
+
Using the second variant, a Token Loader can be used to dynamically load a token from a server. On expiration, the SDK automatically calls the Token Loader to obtain a new token.
39
52
40
-
As long as your handler returns a `String` it will satisfy the contract of `TokenProvider`
53
+
As long as your handler returns a `String` it will satisfy the contract of `TokenLoader`
0 commit comments