Language

Context<TActivity>.IsSignedInAsync(String, CancellationToken) Method

Definition

Caution

Use the OAuthFlow directly: TeamsBotApplication.GetOAuthFlow(connectionName).IsSignedInAsync(context, ...).

Check whether the user has a valid cached token for a given OAuth connection.

[System.Obsolete("Use the OAuthFlow directly: TeamsBotApplication.GetOAuthFlow(connectionName).IsSignedInAsync(context, ...).")]
public System.Threading.Tasks.Task<bool> IsSignedInAsync(string? connectionName = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use the OAuthFlow directly: TeamsBotApplication.GetOAuthFlow(connectionName).IsSignedInAsync(context, ...).")>]
member this.IsSignedInAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function IsSignedInAsync (Optional connectionName As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

connectionName
String

The connection name to check. If null, uses the single registered connection.

cancellationToken
CancellationToken

A cancellation token.

Returns

True if the user has a valid token; false otherwise.

Attributes

Applies to