AzureAD / microsoft-authentication-library-for-go

The MSAL library for Go is part of the Microsoft identity platform for developers (formerly named Azure AD) v2.0. It enables you to acquire security tokens to call protected APIs. It uses industry standard OAuth2 and OpenID Connect.
MIT License
218 stars 87 forks source link

[Feature Request] TokenCache should create the cache file if it doesn't exist #444

Open quynhduongphl opened 11 months ago

quynhduongphl commented 11 months ago

Is your feature request related to a problem? Please describe. The credential's New(..., WithCache(...)) will fail if the file path provided in the TokenCache declaration does not exist.

Describe the solution you'd like TokenCache will create the file if it doesn't exist already rather than throwing "file does not exist" error

Describe alternatives you've considered Any other better way to handle this than throwing "File does not exist" error

Additional context Screenshot 2023-07-25 172928