We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The redirect URL is being encoded for ImplicitUserTokenBuilder when it should not be.
For example this code:
pub fn sign_in() { let client_id = ClientId::new(String::from("<clientidhere>")); let redirect_url = url::Url::parse("http://localhost:7777").unwrap(); println!("{redirect_url}"); let mut builder = ImplicitUserTokenBuilder::new(client_id, redirect_url); builder.add_scope(Scope::UserReadFollows); let (request_url, csrf_token) = builder.generate_url(); println!("{request_url}"); oauth2_server::spawn_oauth_listener(csrf_token); }
Prints this:
http://localhost:7777/ https://id.twitch.tv/oauth2/authorize?response_type=token&client_id=<cliendidhere>&redirect_uri=http%3A%2F%2Flocalhost%3A7777%2F&state=KwdgFYe1bVQ7wbdL4NsomQ%3D%3D&scope=user%3Aread%3Afollows
But the URL that it should generate is this:
http://localhost:7777/ https://id.twitch.tv/oauth2/authorize?response_type=token&client_id=<cliendidhere>&redirect_uri=http://localhost:7777&state=KwdgFYe1bVQ7wbdL4NsomQ%3D%3D&scope=user%3Aread%3Afollows
TLDR should get redirect_uri=http://localhost:7777 instead of redirect_uri=http%3A%2F%2Flocalhost%3A7777%2F
redirect_uri=http://localhost:7777
redirect_uri=http%3A%2F%2Flocalhost%3A7777%2F
The text was updated successfully, but these errors were encountered:
This is a known issue, duplicate of #112
it's due to how the URL crate does this. Technically https://example.org is not an url, it's missing a path
https://example.org
Sorry, something went wrong.
also, I'd like to point you towards using DCF :3 its imo way better than implicit, it even allows refreshing the token :D
Wow yeah that's a lot easier thanks.
No branches or pull requests
The redirect URL is being encoded for ImplicitUserTokenBuilder when it should not be.
For example this code:
Prints this:
But the URL that it should generate is this:
TLDR should get
redirect_uri=http://localhost:7777
instead ofredirect_uri=http%3A%2F%2Flocalhost%3A7777%2F
The text was updated successfully, but these errors were encountered: