Hi I am receiving an error response "securecookie: the value is too long" when saving the session cookie in my gin application, how do I work around this issue?
func SetSessionClaims(c *gin.Context, claims *auth.Claims) {
session := sessions.Default(c)
if claims == nil {
session.Delete("user")
return
}
session.Set("user", *claims)
if err := session.Save(); err != nil {
panic(err)
}
}
after searching the web, it seems to be related to gorilla sessions as seen auth0-samples/auth0-golang-web-app#4
Hello I'm confused about the Sign-Up process in Casdoor. What I do:
Bottom line. Is it possible for a user to sign up and sign in inside a specific app ? And do NOT provide access to admin console for registered users.
I appreciate link to code examples with the proper Sign UP process. I checked Casnode, but it seems to impl the default logic.
Thanks !
http://localhost:8000/login
instead of smth like http://localhost:8000/login/oauth/authorize?client_id=cb92c38bb2cd6d3366a4&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A9000%2Fauth&scope=read&state=web-console
- "81:8000"
volumes:
- ./casdoor:/conf
environment:
RUNNING_IN_DOCKER: "true"
func GlobalUserSetPasswd(owner string, name string, oldPasswd string, newPasswd string) (ok bool, err error) {
formData := url.Values{
"userOwner": {owner},
"userName": {name},
"oldPassword": {oldPasswd},
"newPassword": {newPasswd},
}
res, err := http.PostForm(fmt.Sprintf("%s/api/set-password", CasdoorEndpoint), formData)
if err != nil {
log.Panicln(err)
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
log.Panicln(err)
}
fmt.Printf("%s\n", string(body))
return true, nil
}
Hi
I'm exited with this project, but have a problem. When I run go run main.go first time after cloning source and adjust app.conf to use postres, all works fine (back and front)
but trying to run it a second time i get
https://gcdnb.pbrd.co/images/d4PfwHOfrZNX.png?o=1
I already tried to delete the tmp files and database. but only way to get it running is delete source, clone, and start from there....
Hello,
Is there any possibility to manage roles, permission and assign to user via go or java SDK ?
I have tried to create user with role (manually created in UI), user has been created successfully
but i can't see roles assigned to user e.g. roles seems to be ignored.
Thanks