ronzeidman / ng2-ui-auth

an angular2 repository for authentication based on angular1's satellizer
MIT License
206 stars 64 forks source link

LinkedIn login not working #116

Closed mituljindal closed 7 years ago

mituljindal commented 7 years ago

LinkedIn login is not working. When I make a request, I get authorisation code in the redirect url and that is it. Nothing happens. Neither the completion handler, nor the error handler executes.

My linkedin configuration:

linkedin: { 
          clientId: CONFIG.LINKEDIN_CLIENT_ID,
          url: backendDomain + 'auth/linkedin',
          authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',
          redirectUri: window.location.origin,
          requiredUrlParams: ['state'],
          scope: ['r_emailaddress'],
          scopeDelimiter: ' ',
          state: 'whySoSerious',
          oauthType: '2.0',
          popupOptions: { width: 527, height: 582 },
        }

Where the function is being called:

authenticate(provider: string) {
    this.resp = this.auth.authenticate(provider)
      .subscribe({
        error: (err: any) => console.log(err),
        complete: () => console.log("complete")
      })
}

I have implemented the Google OAuth2, and it is working.

mituljindal commented 7 years ago

authorizationEndpoint needed to be updated.