This commit is contained in:
thosakwe 2017-04-26 10:04:45 -04:00
parent cd4537733e
commit b00329f632
3 changed files with 9 additions and 3 deletions

View file

@ -1,6 +1,6 @@
# angel_auth # angel_auth
[![version 1.0.4](https://img.shields.io/badge/version-1.0.4-brightgreen.svg)](https://pub.dartlang.org/packages/angel_auth) [![version 1.0.4+1](https://img.shields.io/badge/version-1.0.4+1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_auth)
![build status](https://travis-ci.org/angel-dart/auth.svg?branch=master) ![build status](https://travis-ci.org/angel-dart/auth.svg?branch=master)
A complete authentication plugin for Angel. Inspired by Passport. A complete authentication plugin for Angel. Inspired by Passport.

View file

@ -271,6 +271,12 @@ class AngelAuth extends AngelPlugin {
return true; return true;
} else { } else {
// Check if not redirect
if (res.statusCode == 301 ||
res.statusCode == 302 ||
res.headers.containsKey(HttpHeaders.LOCATION))
return false;
else
await authenticationFailure(req, res); await authenticationFailure(req, res);
} }
}; };

View file

@ -1,6 +1,6 @@
name: angel_auth name: angel_auth
description: A complete authentication plugin for Angel. description: A complete authentication plugin for Angel.
version: 1.0.4 version: 1.0.4+1
author: Tobe O <thosakwe@gmail.com> author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_auth homepage: https://github.com/angel-dart/angel_auth
environment: environment: