Skip to content

Unclear deprecation warnings #301

@chlowell

Description

@chlowell

When I complete an auth code flow using the pre-1.7.0 API, for example:

app.get_authorization_request_url(...)
app.acquire_token_by_authorization_code(...)

I get four warnings from internal modules:

msal\oauth2cli\oidc.py:113: DeprecationWarning: Use initiate_auth_code_flow() instead
msal\oauth2cli\oauth2.py:415: DeprecationWarning: Use initiate_auth_code_flow() instead.
msal\oauth2cli\oidc.py:130: DeprecationWarning: Use obtain_token_by_auth_code_flow() instead
msal\oauth2cli\oauth2.py:684: DeprecationWarning: Use obtain_token_by_auth_code_flow() instead

To avoid these warnings, I should write this code instead:

app.initiate_auth_code_flow(...)
app.acquire_token_by_auth_code_flow(...)

The warnings don't lead me there because they assume I'm using msal.oauth2cli.Client instead of ClientApplication. It seems like ClientApplication methods should warn instead, and the messages should tell me which method calls to change.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions