paulvanbladel / aurelia-auth

:key: Authentication plugin for aurelia
200 stars 74 forks source link

oAuth2 - Login fails in IE11 due to use of String.includes() #164

Closed chriswait closed 7 years ago

chriswait commented 7 years ago

Background

During login, while processing the oAuth response data, there is a check to see if the current setting's responseType includes the string "TOKEN" (https://github.com/paulvanbladel/aurelia-auth/blob/master/src/oAuth2.js#L70)

Issue

The String.includes() method is unsupported in IE11 (http://www.w3schools.com/jsref/jsref_includes.asp), which means login cannot succeed in this browser.

Potential fix

Replace usage of String.includes('foo') with (String.indexOf('foo') !== -1).

andreasohlund commented 7 years ago

This is fixed and released in 3.0.4 right?

paulvanbladel commented 7 years ago

Yeah I would think so.