hello.js icon indicating copy to clipboard operation
hello.js copied to clipboard

Support on auth.error event

Open MrSwitch opened this issue 6 years ago • 0 comments

On page redirect authentication login is captured. However errors are not.

e.g. stored in localstorage would be...

{
	"adB2CSignInSignUp": {
		"error": {
			"code": "access_denied",
			"message": "AADB2C90118:+The+user+has+forgotten+their+password.\r\nCorrelation+ID:+3f341530-ed9a-4546-a646-2e2ac3e3b43d\r\nTimestamp:+2017-07-25+19:29:24Z\r\n"
		},
		"error_description": "AADB2C90118:+The+user+has+forgotten+their+password.\r\nCorrelation+ID:+3f341530-ed9a-4546-a646-2e2ac3e3b43d\r\nTimestamp:+2017-07-25+19:29:24Z\r\n",
		"state": "",
		"client_id": "da7caa3a-739c-436c-a32b-b428d3e8c043",
		"network": "adB2CSignInSignUp",
		"display": "page",
		"redirect_uri": "https://localhost:44369/redirect",
		"scope": "openid,https://foobar.onmicrosoft.com/foobarapi/use",
		"page_uri": "https://localhost:44369"
	}
}

This should trigger any listeners on auth.error on page load.

MrSwitch avatar Feb 17 '18 17:02 MrSwitch