diff --git a/README.md b/README.md index 39b78d74..485caabb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 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) A complete authentication plugin for Angel. Inspired by Passport. diff --git a/lib/src/plugin.dart b/lib/src/plugin.dart index 1dfff5ee..c0790170 100644 --- a/lib/src/plugin.dart +++ b/lib/src/plugin.dart @@ -271,7 +271,13 @@ class AngelAuth extends AngelPlugin { return true; } else { - await authenticationFailure(req, res); + // Check if not redirect + if (res.statusCode == 301 || + res.statusCode == 302 || + res.headers.containsKey(HttpHeaders.LOCATION)) + return false; + else + await authenticationFailure(req, res); } }; } diff --git a/pubspec.yaml b/pubspec.yaml index 67e800e3..389fc8a5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_auth description: A complete authentication plugin for Angel. -version: 1.0.4 +version: 1.0.4+1 author: Tobe O homepage: https://github.com/angel-dart/angel_auth environment: