auth0

How to use the HashLocationStrategy with the Auth0 Lock widget for user login

北战南征 提交于 2019-11-27 09:10:16
After updating the Auth0 login sample to use HashLocationStrategy in app.module.ts : import { LocationStrategy, HashLocationStrategy } from '@angular/common'; // (...) @NgModule({ providers: [ {provide: LocationStrategy, useClass: HashLocationStrategy}, appRoutingProviders, AUTH_PROVIDERS ], //(...) The Auth0 Lock authenticated event is not raised anymore: import { Injectable } from '@angular/core'; import { tokenNotExpired } from 'angular2-jwt'; // Avoid name not found warnings declare var Auth0Lock: any; @Injectable() export class Auth0Service { // Configure Auth0 lock = new Auth0Lock(

RS256 vs HS256: What's the difference?

早过忘川 提交于 2019-11-26 21:09:43
I'm using Auth0 to handle authentication in my web app. I'm using ASP.NET Core v1.0.0 and Angular 2 rc5 and I don't know much about authentication/security in general. In the Auth0 docs for ASP.NET Core Web Api , there are two choices for the JWT algorithm being RS256 and HS256. This may be a dumb question but: What's the difference between RS256 and HS256? What are some use cases (if applicable)? Both choices refer to what algorithm the identity provider uses to sign the JWT. Signing is a cryptographic operation that generates a "signature" (part of the JWT) that the recipient of the token

CSRF protection with JSON Web Tokens

柔情痞子 提交于 2019-11-26 18:46:35
问题 I read that when using JWT, there is no need to protect against CRSF attacks, for instance: "since you are not relying on cookies, you don't need to protect against cross site requests". However, something I do not understand: if I store the token in localStorage (as I was advised on a tutorial of the same website), what prevents an attacker to forge a malicious request by reading my localStorage instead of my cookies ? Since it was generated on the server side, I don't get how I could use a

RS256 vs HS256: What's the difference?

浪子不回头ぞ 提交于 2019-11-26 07:51:02
问题 I\'m using Auth0 to handle authentication in my web app. I\'m using ASP.NET Core v1.0.0 and Angular 2 rc5 and I don\'t know much about authentication/security in general. In the Auth0 docs for ASP.NET Core Web Api, there are two choices for the JWT algorithm being RS256 and HS256. This may be a dumb question but: What\'s the difference between RS256 and HS256? What are some use cases (if applicable)? 回答1: Both choices refer to what algorithm the identity provider uses to sign the JWT. Signing