oauth2
oauth2 copied to clipboard
Example run failure when I Revise Client ID, Secret in server, client
The client ID and Secret shown in the example are modified as follows me, and the token is not issued.
my client ID / Secret info
example/client.go
clientStore := store.NewClientStore() clientStore.Set("222222=.a", &models.Client{ ID: "222222=.a", Secret: "22222222", Domain: "http://localhost:9094", }) manager.MapClientStorage(clientStore)
example/server.go
var ( config = oauth2.Config{ ClientID: "222222=.a", ClientSecret: "22222222", Scopes: []string{"all"}, RedirectURL: "http://localhost:9094/oauth2", Endpoint: oauth2.Endpoint{ AuthURL: authServerURL + "/authorize", TokenURL: authServerURL + "/token", }, } globalToken *oauth2.Token // Non-concurrent security )
error msg
Code not found
I confirmed that the ID Secret data type is a string. What if I can't check the code?
I think this is an encoding problem. The special character '=' is processed as '%3D' in the part of the client ID, and it seems to be an error when comparing the client ID.