TwanoO67 / bootstraping-ngx-admin-lte

Angular2,4,6 project with AdminLTE dashboard template (using angular, angular-cli and ngx-admin-lte ) Formerly called 'ng2-admin-lte'.
463 stars 220 forks source link

400 Error when Auth0 Firebase Integration #58

Closed boskiv closed 7 years ago

boskiv commented 7 years ago

I have setup my own auth0 account and firebase account. When I log in, it successfully works, but in console I have error POST https://boskiv.eu.auth0.com/delegation 401 (Unauthorized)

How can I dig into it ? I have setup firebase connection with auth0 already.

Also I've fount this code in auth.serve.ts

private generateAuthOption = (token: string): any => {
    return {
      api: 'firebase',
      id_token: token,
      scope: 'openid name email displayName',
      target: 'uyZPfupm9XEM2jdDwiz9xGmvDnly5ydU'
    };
  }

Need I change target string to my own ? Where I can get it then ?

2016-12-24 13 53 00

boskiv commented 7 years ago

I have also noticed that no permissions are granted in firebase to my user from auth0 Uncaught Error: permission_denied at /clients: Client doesn't have permission to access the desired data.

boskiv commented 7 years ago

I have found this tutorial: https://auth0.com/blog/firebase-authentication-with-firebase-3.0-and-auth0-integration/

Fix target with my auth0 client id.

Now I have 400 response :(

2016-12-24 14 37 08

2016-12-24 14 41 24

boskiv commented 7 years ago

My bad, I have several firebase projects and missconfigured with credentials. From scratch all works fine.