shouldRemoveLoginRequestedScope indicates whether the requested-scope cache should be removed after polling finishes.
(result *larkauth.DeviceFlowResult)
| 84 | // shouldRemoveLoginRequestedScope indicates whether the requested-scope cache |
| 85 | // should be removed after polling finishes. |
| 86 | func 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 | } |
no outgoing calls
no test coverage detected