ledgerconnect / steemconnect

Signer app for Steem
https://steemconnect.com
MIT License
159 stars 88 forks source link

URI arguments in redirect_uri #168

Closed jlebrijo closed 6 years ago

jlebrijo commented 6 years ago

I am using the authorize URL in Oauth2 protocol:

https://v2.steemconnect.com/oauth2/authorize?client_id=crowdini.app&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fusers%2Fauth%2Fsteemconnect%2Fcallback%3Freferring_id%3D&response_type=code&scope=vote%2Ccomment&state=5710294e8f887b8ef979d046783ca3fb1b25fd9db5fbfe6b

I know you need the exact URI in redirect_uri, to accept the call.

But it would be great for me to be able to pass variables like referring_id.

Could you make an improvement to accept variables in redirect_uri ?

bonustrack commented 6 years ago

@jlebrijo If you want to pass a variable you can send it with the parameter &state=referring_id.

jlebrijo commented 6 years ago

I mean the redirect_uri, in order to get this code when successfully logged. I mean sending for example:

http://localhost:3000/users/auth/steemconnect/callback/referring_id=123456

The URI could be the exact one, but with variables. You can make the comparison like redirect_uri.start_with?('http://.....') instead of an equal comparison.

bonustrack commented 6 years ago

I see but this doesn't work and we don't plan to support it like that, the solution is the parameter state, you can pass any variable from this.