Skip to content

Commit

Permalink
Add documentation for the new interface
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Oct 23, 2024
1 parent 74c69ec commit 1baff80
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions LineSDK/LineSDK/Login/LoginResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ import Foundation

/// Represents a successful login.
public struct LoginResult {


/// Represents a login route for how the auth flow is initiated.
public enum LoginRoute: String {
/// The auth flow starts with a LINE app universal link.
case appUniversalLink
/// The auth flow starts with a LINE customize URL scheme.
case appAuthScheme
/// The auth flow starts in a web page inside LINE SDK.
case webLogin
}

Expand All @@ -45,7 +49,12 @@ public struct LoginResult {
/// The `nonce` value when requesting ID Token during login process. Use this value as a parameter when you
/// verify the ID Token against the LINE server. This value is `nil` if `.openID` permission is not requested.
public let IDTokenNonce: String?

/// Describes how the authentication flow was initiated for this login result.
///
/// If the LINE app was launched to obtain this result, the value will be either `.appUniversalLink` or
/// `.appAuthScheme`, depending on how the LINE app was opened. If authentication occurred via a web page within
/// the LINE SDK, the value will be `.webLogin`. If the authentication flow was never initiated, the value will
/// be `nil`.
public let loginRoute: LoginRoute?
}

Expand Down

0 comments on commit 1baff80

Please sign in to comment.