Skip to content

Commit 32605e2

Browse files
committed
fix: ask for audience in login, so we get a JWT
1 parent ef47eec commit 32605e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ml/cli/login.ml

+3-1
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,15 @@ let run (self : Opts.login) : int =
118118
let _t_server = Thread.create (fun () -> H.run_exn h) () in
119119

120120
let redirect_uri = spf "http://localhost:%d/cb/" self.local_port in
121+
let audience = "https://imandrax.dev.imandracapital.com/" in
121122
(* URL to open in the user's browser *)
122123
let url =
123124
let client_id = "EZBvjhs2aiatKUNeUuIWcph7ZoBpYckB" in
124125
if self.dev then
125126
spf
126-
"https://test-ai.eu.auth0.com/authorize?response_type=token&client_id=%s&redirect_uri=%s&state=%s"
127+
"https://test-ai.eu.auth0.com/authorize?response_type=token&client_id=%s&audience=%s&redirect_uri=%s&state=%s"
127128
client_id
129+
(H.Util.percent_encode audience)
128130
(H.Util.percent_encode redirect_uri)
129131
(H.Util.percent_encode nonce)
130132
else

0 commit comments

Comments
 (0)