Instance Method

authorizationResponseHandler(for:)

Handles the DeviceAuthorizationFlow.DeviceAuthResponse Response from a call to deviceFlowAuthorizationRequest(). Sends a HTTP request to the initialized token endpoint for the tokens. Polling will only happen for 15 minutes.

Declaration

func authorizationResponseHandler(for response: Response) async throws

Parameters

for

Discussion

Tokens are saved to the Keychain instance provided by the initializer. The tokens are saved using the instance’s client id and the string “tokens” separated by a colon as the key. For example: “9d73bfb50b304543b35f41d427e6b76c:tokens”

If an HTTP error occurs, the token request will be retried once.

See Also