Hi all,
I’m having issues with a aurelia systemjs implementation when using aurelia-open-id-connect plugin.
Somehow when using the plugin, the aurelia project won’t start and gives a syntax error.
When using the plugin in our aurelia webpack webapp, everything works fine.
I made a post about it on the github for the plugin but it doesn’t seem very alive anymore so i’m asking my question here
Is there someone who might now wat can cause the issue?
I copied my problem(full text) from the post on the github here below :).
Edit 2:
our webpack project is running aurelia 0.34.0 and our systemjs project is running 0.35.0.
end Edit 2
Edit 3
also changed the index.html as described by the plugin page to have a div wrapper
<body >
<div aurelia-app="main">
<script src="scripts/vendor-bundle.js"></script>
<script>
SystemJS.import("aurelia-bootstrapper").catch(function (error) { console.log(error); });
</script>
<script>
Promise.config({ longStackTraces: false, cancellation: true });
</script>
<script src="scripts/jquery.signalR.min.js"></script>
<!--<script src="signalr/hubs"></script>-->
</div>
</body>
End edit 3*
Original post can be found here
Hi,
I’m having issues getting the aurelia-open-id-connect plugin to work in a aurelia systemjs project.
Somehow when i add the following code to the main.ts a ‘unexpected token <’ error appears in the log. When i remove the code below, the error disappears and my application starts normal
aurelia.use.plugin('aurelia-open-id-connect', () => openIdConfiguration);
The project is running aurelia-cli 0.35.0 with systemjs 0.21.5.
I have added the plugin and oidc-client plugin to my aurelia.json file but it did not help. I also edited my app.ts routes with the OpenIdConnectRoles but that also did not help.I looked at the demos and from what i can tell everything looks good.
Config that is used:
import { OpenIdConnectConfiguration } from "aurelia-open-id-connect";
import { UserManagerSettings, WebStorageStateStore } from "oidc-client";
const appHost = "http://localhost:9000";
export default {
loginRedirectRoute: "/private",
logoutRedirectRoute: "/index",
unauthorizedRedirectRoute: "/index",
userManagerSettings: {
// The number of seconds in advance of access token expiry
// to raise the access token expiring event.
accessTokenExpiringNotificationTime: 1,
// Either host your own OpenID Provider or select a certified authority
// from the list http://openid.net/certification/
authority: "http://localhost/CustomerName/Identity/",
automaticSilentRenew: true,
// IdentityServer4 supports OpenID Connect Session Management
// https://openid.net/specs/openid-connect-session-1_0.html
monitorSession: true,
checkSessionInterval: 2000,
// The client or application ID that the authority issues.
client_id: "CustomerClient",
filterProtocolClaims: true,
loadUserInfo: false,
post_logout_redirect_uri: `${appHost}/signout-oidc`,
redirect_uri: `${appHost}/signin-oidc`,
response_type: "id_token",
scope: "openid jcc-setup",
// number of millisecods to wait for the authorization
// server to response to silent renew request
silentRequestTimeout: 10000,
silent_redirect_uri: `${appHost}/signin-oidc`,
userStore: new WebStorageStateStore({
prefix: "oidc",
store: window.localStorage,
}),
} as UserManagerSettings,
} as OpenIdConnectConfiguration;
Edit 1
Forgot to mention this:
aurelia.json
"aurelia-templating-binding",
{
"name": "aurelia-open-id-connect",
"path": "../node_modules/aurelia-open-id-connect/dist/amd",
"main": "index"
},
"oidc-client",
End edit 1*
Have i forgotten something?