I'm trying to load a library into an Angular2 application using systemjs to bootstrap it.
I have found these two libraries
But I'm having trouble to make it all work.
systemjs.config.js along with the other dependencies.
map : { 'ng2-oauth2' : 'node_modules/ng2-oauth2/bundles/ng2-oauth2.js' }
And I'm trying to import it like this, but it fails
import {OAUTH2_PROVIDERS } from 'ng2-oauth2';
So my questions,
I want to intergrate my application with Google OIDC as a test IdP and then my own.
you can use angular-oauth2-oidc, here is systemjs config
'angular-oauth2-oidc': {
main: 'angular-oauth2-oidc.umd.js',
format: 'cjs',
defaultExtension: 'js',
map: {
'jsrsasign': '/node_modules/jsrsasign/lib/jsrsasign',
},
meta: {
'angular-oauth2-oidc': {
deps: ['require','jsrsasign']
},
}
}
check this for more details
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.