okta / okta-sdk-golang

A Golang SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
https://github.com/okta/okta-sdk-golang
Other
171 stars 142 forks source link

return error when access token request failed to avoid using empty tokens #452

Closed alex-k closed 1 month ago

alex-k commented 2 months ago

return error when access token request failed to avoid using null access tokens

Summary

Currently empty access tokens could be submitted to OKTA that leads to failed requests with uncertain reasons. This happens when access token request completed with non-OK status code.

This PR fixes this behaviour by retuning an error with proper error descriptions instead of returning a null access token which is invalid obviously.

Fixes N/A

Type of PR

Test Information

Go Version: 1.21.6 Os Version: MacOS 12.3 (Kernel Version 21.4.0) OpenAPI Spec Version:

Signoff

github-actions[bot] commented 1 month ago

This PR has been marked stale because there has been no activity within the last 28 days. To keep this PR active, remove the stale label.

duytiennguyen-okta commented 1 month ago

we are no longer support sdk v2 and this has been fixed in v4