-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@azure/identity-TokenCredential #371
Conversation
This PR depends on #370 |
samples/tokenCredentialSamples/AuthenticationCodeFlow/package.json
Outdated
Show resolved
Hide resolved
src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts
Outdated
Show resolved
Hide resolved
src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts
Outdated
Show resolved
Hide resolved
src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts
Outdated
Show resolved
Hide resolved
src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts
Show resolved
Hide resolved
samples/tokenCredentialSamples/AuthenticationCodeFlow/README.md
Outdated
Show resolved
Hide resolved
samples/tokenCredentialSamples/AuthenticationCodeFlow/src/index.ts
Outdated
Show resolved
Hide resolved
may also be good to have a pure javascript sample at some point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for nitpicking on the typos. I added those comments as most of them appear in public documentation (MD files).
samples/tokenCredentialSamples/AuthenticationCodeFlow/src/index.ts
Outdated
Show resolved
Hide resolved
samples/tokenCredentialSamples/AuthenticationCodeFlow/src/index.ts
Outdated
Show resolved
Hide resolved
samples/tokenCredentialSamples/ClientCredentialFlow/typescript/secrets.sample.ts
Show resolved
Hide resolved
Thanks for point those out. I should be careful about that. |
Co-authored-by: Mustafa Zengin <[email protected]>
Added. |
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: Mustafa Zengin <[email protected]>
Hey folks |
TokenCredentialAuthenticationProvider
option so that authentication can be done using the@azure/identity- tokenCredential
classes.TokenCredentialAuthenticationProvider
usingAuthenticationCodeFlow and ClientCredentialFlow
@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials
. This is a workaround for the limitations Recommendation for exposing multiple TypeScript modules from single NPM package microsoft/TypeScript#8305 ,Support for NodeJS 12.7+ package exports microsoft/TypeScript#33079.
The idea for using a submodule structure to export the authProviderOptions is because -
We are not exporting
TokenCredentialAuthenticationProvider
andImplicitMsalAuthenticationProvider
in thesrc/index.ts
. This makesmsal
and@azure/identity
an optional dependency for the user of the sdk. Marking them as option using peerDependenciesMeta.ImplicitMSALAuthenticationProvider is not exported in index.js #230 -
ImplicitMsalAuthenticationProvider
was not exported in JS SDK version < 2.1 as usingmsal
was optional but exporting in the index file would makemsal
a runtime dependency.To import
TokenCredentialAuthenticationProvider
andImplicitMsalAuthenticationProvider
, the paths would beAdded
tsconfig-sub-x.json
to build the project using TypeScript Project References