-
Notifications
You must be signed in to change notification settings - Fork 232
@azure/identity-TokenCredential #371
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
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 |
zengin
left a comment
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 |
TokenCredentialAuthenticationProvideroption so that authentication can be done using the@azure/identity- tokenCredentialclasses.TokenCredentialAuthenticationProviderusingAuthenticationCodeFlow 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
TokenCredentialAuthenticationProviderandImplicitMsalAuthenticationProviderin thesrc/index.ts. This makesmsaland@azure/identityan optional dependency for the user of the sdk. Marking them as option using peerDependenciesMeta.ImplicitMSALAuthenticationProvider is not exported in index.js #230 -
ImplicitMsalAuthenticationProviderwas not exported in JS SDK version < 2.1 as usingmsalwas optional but exporting in the index file would makemsala runtime dependency.To import
TokenCredentialAuthenticationProviderandImplicitMsalAuthenticationProvider, the paths would beAdded
tsconfig-sub-x.jsonto build the project using TypeScript Project References