How to implement OpenID in Angular 4

Viewed 1329

I'm building an application with Angular 4 that I want to integrate with Steam.

I'm currently trying to wrap my head around openID and how to use it to get a user's 64-bit Steam ID. This is going badly. I've found the TypeScript lib on openID's website and installed it to my app but steam says I need to set http://steamcommunity.com/openid as the provider.

Having looked thoroughly over the documentation for the Angular 4 OpenID lib I can't find "provider" anywhere D:

Then again, I'm not even sure I'm using the right library! (OpenID mentions "obsolete specifications such as OpenID 2" which I'm pretty sure is what Steam uses)

How can I proceed with this? Or is there a simpler API for accessing steam with OpenID?

Edit

Here's the code for the config, which is where I realised I didn't understand what I was doing anymore:

export class AppModule {
constructor(public oidcSecurityService: OidcSecurityService) {

    let openIDImplicitFlowConfiguration = new OpenIDImplicitFlowConfiguration();
    openIDImplicitFlowConfiguration.stsServer = 'https://localhost:44318';
    openIDImplicitFlowConfiguration.redirect_url = 'https://localhost:44311';
    openIDImplicitFlowConfiguration.client_id = 'angularclient';
    openIDImplicitFlowConfiguration.response_type = 'id_token token';
    openIDImplicitFlowConfiguration.scope = 'openid email profile';
    openIDImplicitFlowConfiguration.post_logout_redirect_uri = 'https://localhost:44311/Unauthorized';
    openIDImplicitFlowConfiguration.startup_route = '/home';
    openIDImplicitFlowConfiguration.forbidden_route = '/Forbidden';
    openIDImplicitFlowConfiguration.unauthorized_route = '/Unauthorized';
    openIDImplicitFlowConfiguration.log_console_warning_active = true;
    openIDImplicitFlowConfiguration.log_console_debug_active = false;
    openIDImplicitFlowConfiguration.max_id_token_iat_offset_allowed_in_seconds = 10;
    openIDImplicitFlowConfiguration.override_well_known_configuration = false;
    openIDImplicitFlowConfiguration.override_well_known_configuration_url = 'https://localhost:44386/wellknownconfiguration.json';
    // openIDImplicitFlowConfiguration.storage = localStorage;

    this.oidcSecurityService.setupModule(openIDImplicitFlowConfiguration);
}
1 Answers
Related