File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,6 @@ struct AuthInitResponse {
5656pub async fn run_auth ( reset : bool , auth_provider : & str ) -> Result < ( ) > {
5757 println ! ( "Attempting authentication via {}..." , auth_provider) ;
5858
59- if auth_provider == "discord" {
60- panic ! ( "Discord authentication is not supported yet... WIP" ) ;
61- }
62-
6359 let popcorn_api_url = std:: env:: var ( "POPCORN_API_URL" )
6460 . map_err ( |_| anyhow ! ( "POPCORN_API_URL environment variable not set" ) ) ?;
6561
@@ -99,9 +95,12 @@ pub async fn run_auth(reset: bool, auth_provider: &str) -> Result<()> {
9995 }
10096 "github" => {
10197 let client_id = "Ov23lieFd2onYk4OnKIR" ;
98+ let redirect_uri =
99+ "https://discord-cluster-manager-1f6c4782e60a.herokuapp.com/auth/cli/github" ;
100+ let encoded_redirect_uri = urlencoding:: encode ( redirect_uri) ;
102101 format ! (
103- "https://github.com/login/oauth/authorize?client_id={}&state={}" ,
104- client_id, state_b64
102+ "https://github.com/login/oauth/authorize?client_id={}&state={}&redirect_uri={} " ,
103+ client_id, state_b64, encoded_redirect_uri
105104 )
106105 }
107106 _ => {
You can’t perform that action at this time.
0 commit comments