Getting error over vk.cr while not even using vk
omerxx opened this issue · 3 comments
omerxx commented
Trying to implement GitHub authentication with Amber but I keep an error over VK this during multi_auth.authorize_uri
.
This is my initialization code:
MultiAuth.config("github", GITHUB_CLIENT_ID, GITHUB_SECRET_KEY)
multi_auth = MultiAuth.make("github", "/callback")
multi_auth.authorize_uri
This is the output error from trying to build with amber watch
:
multi_auth = MultiAuth.make("github", "/callback").authorize_uri # initialize engine
^~~~~~~~~~~~~
in lib/multi_auth/src/multi_auth/engine.cr:20: instantiating 'authorize_uri(Nil)'
def authorize_uri(scope = nil)
^~~~~~~~~~~~~
in lib/multi_auth/src/multi_auth/engine.cr:21: instantiating 'MultiAuth::Provider+#authorize_uri(Nil)'
provider.authorize_uri(scope)
^~~~~~~~~~~~~
in lib/multi_auth/src/multi_auth/providers/vk.cr:4: instantiating 'client()'
client.get_authorize_uri(@scope)
^~~~~~
in lib/multi_auth/src/multi_auth/providers/vk.cr:96: no argument named 'auth_scheme'
Matches are:
- OAuth2::Client.new(host : String, client_id : String, client_secret : String, port : Int32 | ::Nil = nil, scheme = "https", authorize_uri = "/oauth2/authorize", token_uri = "/oauth2/token", redirect_uri : String | ::Nil = nil)
OAuth2::Client.new(
I followed all the relevant integration examples and not even referring to VK at any point.
Any ideas?
omerxx commented
Disabling auth_scheme
in the GitHub GitLab and Vk providers allow a full build to complete. Haven't gone deep enough to understand whether these are Oauth2 changes but I think it requires attention...
msa7 commented
Actually all tests passed on crystal 0.35.1. And I see auth_scheme
in master https://github.com/crystal-lang/crystal/blob/5999ae29b/src/oauth2/client.cr#L68.
Which crystal version do you use?