Fix issue where certain providers do not return the 'provider' field

Not all passport providers return `profile.provider` (notably OpenID). This causes an error when trying to authenticate against those providers i.e. `passport-google`.

Fixed the problem by using `query.provider` as a backup source when `profile.provider` is `undefined`.

Additionally, removed the unused `config` variable declaration.
Could you convert the tab to spaces and use comma-first? Consistency is key :+1: