Skip to content

Commit

Permalink
feat: print one-time code
Browse files Browse the repository at this point in the history
Signed-off-by: Kohei Morita <[email protected]>
  • Loading branch information
mrtc0 committed Sep 25, 2023
1 parent 9605f8b commit 6d2a139
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"flag"
"fmt"
"log"
"os"
"os/exec"
Expand Down Expand Up @@ -85,6 +86,9 @@ func main() {

createTokenInput := ssooidc.CreateTokenInput{ClientId: registerClientOutput.ClientId, ClientSecret: registerClientOutput.ClientSecret, DeviceCode: startDeveiceAuthorizationOutput.DeviceCode, GrantType: &grantType}

userCode := *startDeveiceAuthorizationOutput.UserCode
fmt.Fprintf(os.Stderr, "One-time user verification code: %s\n", userCode)

launchBrowser(*startDeveiceAuthorizationOutput.VerificationUriComplete)

for {
Expand Down

0 comments on commit 6d2a139

Please sign in to comment.