I am following the pluralsight course Securing Angular Apps with OpenID Connect and OAuth2 to get up and running with oidc-client in Angular, but I have come across an issue with the silent refresh token, which throws
SilentRenewService._tokenExpiring: Error from signinSilent: Frame window timed out t.error
on the server the client is
new Client
{
ClientId = "spa-client",
ClientName = "Projects SPA",
AllowedGrantTypes = GrantTypes.Implicit,
AllowAccessTokensViaBrowser = true,
RequireConsent = false,
RedirectUris = {
"http://localhost:4200/assets/oidc-login-redirect.html",
"http://localhost:4200/assets/silent-redirect.html"
},
PostLogoutRedirectUris = { "http://localhost:4200/?postLogout=true" },
AllowedCorsOrigins = { "http://localhost:4200/" },
AllowedScopes =
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
"projects-api"
},
IdentityTokenLifetime=30,
AccessTokenLifetime=30
}
and the config on the client is:
var config = {
authority: 'http://localhost:4242/',
client_id: 'spa-client',
redirect_uri: 'http://localhost:4200/assets/oidc-login-redirect.html',
scope: 'openid projects-api profile',
response_type: 'id_token token',
post_logout_redirect_uri: 'http://localhost:4200/?postLogout=true'
userStore: new WebStorageStateStore({ store: window.localStorage }),
automaticSilentRenew: true,
silent_redirect_uri: 'http://localhost:4200/assets/silent-redirect.html'
};
I found a suggested solution from "Sohan" for a similar problem here (this is specifically for azure AD). This then causes
Frame window timed out
Or a suggestion in this post that I should add references for the silent-redirect.html to my angular.json file, this didn't help
I am using Angular 7 and on Chrome Version 73.0.3683.86 (Official Build) (64-bit)