Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func readStoredToken() (*StoredToken, error) {

func deviceFlow(server string) (*TokenResponse, error) {
var authServer string
if server == "juliahub.com" {
if server == "juliahub.com" || server == "juliahub.juliahub.com" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this is a valid domain?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so if you add a server name e.g. custom , it will be converted to custom.juliahub.com. so if someone types only juliahub that will be converted to juliahub.juliahub.com

authServer = "auth.juliahub.com"
} else {
authServer = server
Expand Down Expand Up @@ -233,7 +233,7 @@ func deviceFlow(server string) (*TokenResponse, error) {

func refreshToken(server string, refreshToken string) (*TokenResponse, error) {
var authServer string
if server == "juliahub.com" {
if server == "juliahub.com" || server == "juliahub.juliahub.com" {
authServer = "auth.juliahub.com"
} else {
authServer = server
Expand Down