Allow Oauth2 scopes to be passed as arrays

The scopes should be provided as space-delimited string but we can join them together ourselves if we need.

This patch allows the scopes to be passed either as a string (single scope), space-delimited string or an array of strings (multiple scopes).

Comments/suggestions are welcome, thanks for merging.:)