Estou tentando autenticar meu app Angular com a Steam, porem esta gerando esse erro no log:
Failed to load http://steamcommunity.com/openid/.well-known/openid-configuration: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.
O erro ocorre ao construir o component, ao clicar em login, ele não gera nenhum erro, porem não é redirecionado para tela de login da Steam.
Meu código fonte:
constructor(private oauthService: OAuthService) { this.oauthService.redirectUri = window.location.origin + '/index.html'; this.oauthService.clientId = 'spa-demo'; this.oauthService.scope = 'openid profile email voucher'; this.oauthService.oidc = true; this.oauthService.setStorage(sessionStorage); this.oauthService.issuer = 'http://steamcommunity.com/openid'; this.oauthService.requireHttps = false; this.oauthService.dummyClientSecret = 'geheim'; this.oauthService.loadDiscoveryDocument().then(() => { this.oauthService.tryLogin({}); }); } public login(): void { this.oauthService.clientId = 'spa-demo'; this.oauthService.initImplicitFlow(); }
Estou utilizando o Angular 5.
Documentação do provedor Steam OpenID: https://steamcommunity.com/dev?l=portuguese