Skip to content

Authentication fails on IE9 in the latest version #1469

Description

@ichbinedgar

Hi,
I've updated my generator to the latest version, and the authentication was not working on IE9.
I found the issue in the server/auth/auth.service.js file in this line:

        req.headers.authorization = 'Bearer ' + req.query.access_token;

req.query.access_token is undefined, so I make a workaround like this:

        if(req.headers['user-agent'].indexOf("MSIE") >= 0){
          var aux = req.headers.cookie.split(';');
          var token =  aux[aux.length-1].trim();
          token= token.replace('token=','');
          req.headers.authorization = 'Bearer ' + token;
        }

It can be useful for other people.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions