MCPcopy Index your code
hub / github.com/larksuite/cli / shouldRemoveLoginRequestedScope

Function shouldRemoveLoginRequestedScope

cmd/auth/login_scope_cache.go:86–94  ·  view source on GitHub ↗

shouldRemoveLoginRequestedScope indicates whether the requested-scope cache should be removed after polling finishes.

(result *larkauth.DeviceFlowResult)

Source from the content-addressed store, hash-verified

84// shouldRemoveLoginRequestedScope indicates whether the requested-scope cache
85// should be removed after polling finishes.
86func shouldRemoveLoginRequestedScope(result *larkauth.DeviceFlowResult) bool {
87 if result == nil {
88 return false
89 }
90 if result.OK || result.Error == "access_denied" {
91 return true
92 }
93 return result.Error == "expired_token" && result.Message != "Polling was cancelled"
94}

Callers 1

authLoginPollDeviceCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected