How to login in Auth0 in an E2E test with Cypress?

This is not currently supported in Cypress. I built a workaround that might help, though. I set up a simple server that runs in parallel to cypress. The endpoint opens a headless instance of Puppeteer and completes the login flow, responding to the call with all the cookies: const micro = require(“micro”); const puppeteer = … Read more

Header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’

Problem: You are not configuring ‘Access-Control-Allow-Origin’ correctly and your current configuration is simply ignored by the server. Situation: The Error stack trace says: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. Origin ‘http://localhost:4200’ is therefore not allowed access. It means that … Read more

Laravel Passport vs JWT vs Oauth2 vs Auth0

What are these concepts? Passport is an official Laravel package that implements Oauth2 and JWT. Auth0 is an authentication and authorization service. It is kinda “all in one” solution for API auth. It implements JWT by default and can implement Oauth2 as well as many other protocols. OAuth2 is an authorization framework or protocol that … Read more

CSRF protection with JSON Web Tokens

Strictly speaking, yes, anything stored in local/session storage (which I’ll call HTML5 Storage) could be stolen in a cross-site scripting (XSS) attack. See this article. There are a lot of moving parts to consider, however. First, there are subtle differences in how HTML5 Storage and cookies are scoped with respect to JavaScript access. HTML5 Storage … Read more

OAuth 2.0 vs Auth0

OAuth 2.0 is a standardized authorization protocol, Auth0 is a company that sells an identity management platform with authentication and authorization services that implements the OAuth2 protocol (among others).