Skip to content
Permalink
Browse files
fix(oauth2): use normalized path for callback route check (#587)
  • Loading branch information
rajatjindal committed Apr 2, 2020
1 parent bfc2247 commit ffda6b08747496a24ed4656d7d48db50e6c4c50f
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1,4 +1,4 @@
import { encodeQuery, parseQuery } from '../utilities'
import { encodeQuery, parseQuery, normalizePath } from '../utilities'
import nanoid from 'nanoid'
const isHttps = process.server ? require('is-https') : null

@@ -132,7 +132,7 @@ export default class Oauth2Scheme {

async _handleCallback (uri) {
// Handle callback only for specified route
if (this.$auth.options.redirect && this.$auth.ctx.route.path !== this.$auth.options.redirect.callback) {
if (this.$auth.options.redirect && normalizePath(this.$auth.ctx.route.path) !== normalizePath(this.$auth.options.redirect.callback)) {
return
}
// Callback flow is not supported in server side

1 comment on commit ffda6b0

@whiskas
Copy link

@whiskas whiskas commented on ffda6b0 May 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the '../utilities' ?

Please sign in to comment.