ubccr / mokey

FreeIPA self-service account management portal
BSD 3-Clause "New" or "Revised" License
189 stars 45 forks source link

How to show forgot link on email to HTML Page ? #61

Closed pedro6161 closed 1 year ago

pedro6161 commented 3 years ago

How to showing link for forgot password on html page ? since i dont have email server or OTP server etc version 0.0.6

aebruno commented 3 years ago

You can find the HTML templates in /user/share/mokey. You should be able to add the link there.

pedro6161 commented 3 years ago

i tried put {{link}} on html template but nothing show

Please Advice

pedro6161 commented 3 years ago

Hi,

when i click forget password, showing me like on below :

PANIC: runtime error: invalid memory address or nil pointer dereference goroutine 93 [running]: github.com/ubccr/mokey/vendor/github.com/urfave/negroni.(Recovery).ServeHTTP.func1(0x7f6890d59af8, 0xc42030a480, 0xc4203d2760) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/recovery.go:34 +0xef panic(0xd21400, 0x1301ef0) /usr/local/go/src/runtime/panic.go:491 +0x283 html/template.(Template).lookupAndEscapeTemplate(0x0, 0xdcabc9, 0x6, 0x0, 0x0, 0x0) /usr/local/go/src/html/template/template.go:144 +0x50 html/template.(Template).ExecuteTemplate(0x0, 0x1319480, 0xc4200eafc0, 0xdcabc9, 0x6, 0xd1c980, 0xc42023d0e0, 0x4a42d3369d89a249, 0x7167fe) /usr/local/go/src/html/template/template.go:133 +0x43 github.com/ubccr/mokey/app.(AppContext).RenderTemplate(0xc4203b6040, 0x7f6890d59af8, 0xc42030a480, 0xdd64a4, 0x14, 0xc42023d0e0) /user/aebruno2/go/src/github.com/ubccr/mokey/app/context.go:221 +0x17b github.com/ubccr/mokey/handlers.ForgotPasswordHandler.func1(0x7f6890d59af8, 0xc42030a480, 0xc4201aa100) /user/aebruno2/go/src/github.com/ubccr/mokey/handlers/passwd.go:422 +0x2b5 net/http.HandlerFunc.ServeHTTP(0xc4203bc1b0, 0x7f6890d59af8, 0xc42030a480, 0xc4201aa100) /usr/local/go/src/net/http/server.go:1918 +0x44 github.com/ubccr/mokey/handlers.RateLimit.func1(0x7f6890d59af8, 0xc42030a480, 0xc4201aa100) /user/aebruno2/go/src/github.com/ubccr/mokey/handlers/middleware.go:140 +0x16a2 net/http.HandlerFunc.ServeHTTP(0xc420361be0, 0x7f6890d59af8, 0xc42030a480, 0xc4201aa100) /usr/local/go/src/net/http/server.go:1918 +0x44 github.com/ubccr/mokey/vendor/github.com/gorilla/mux.(Router).ServeHTTP(0xc42039acd0, 0x7f6890d59af8, 0xc42030a480, 0xc4201aa100) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/gorilla/mux/mux.go:114 +0xdc github.com/ubccr/mokey/vendor/github.com/gorilla/csrf.(csrf).ServeHTTP(0xc420297720, 0x7f6890d59af8, 0xc42030a480, 0xc420321e00) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/gorilla/csrf/csrf.go:267 +0x323 github.com/ubccr/mokey/vendor/github.com/urfave/negroni.Wrap.func1(0x7f6890d59af8, 0xc42030a480, 0xc420321d00, 0xc4203d36e0) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:41 +0x4d github.com/ubccr/mokey/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0xc4203d28a0, 0x7f6890d59af8, 0xc42030a480, 0xc420321d00, 0xc4203d36e0) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:24 +0x4e github.com/ubccr/mokey/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x131c940, 0xc4203d28a0, 0xc4203d2900, 0x7f6890d59af8, 0xc42030a480, 0xc420321d00) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:33 +0xa5 github.com/ubccr/mokey/vendor/github.com/urfave/negroni.(middleware).ServeHTTP-fm(0x7f6890d59af8, 0xc42030a480, 0xc420321d00) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:33 +0x60 main.middleware.func2(0x7f6890d59af8, 0xc42030a480, 0xc420321d00, 0xc4203d36c0) /user/aebruno2/go/src/github.com/ubccr/mokey/server.go:107 +0xe0 github.com/ubccr/mokey/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0xdf8808, 0x7f6890d59af8, 0xc42030a480, 0xc420321d00, 0xc4203d36c0) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:24 +0x4e github.com/ubccr/mokey/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x131c940, 0xdf8808, 0xc4203d28e0, 0x7f6890d59af8, 0xc42030a480, 0xc420321d00) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:33 +0xa5 github.com/ubccr/mokey/vendor/github.com/urfave/negroni.(middleware).ServeHTTP-fm(0x7f6890d59af8, 0xc42030a480, 0xc420321d00) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:33 +0x60 github.com/ubccr/mokey/vendor/github.com/urfave/negroni.(Recovery).ServeHTTP(0xc4203d2760, 0x7f6890d59af8, 0xc42030a480, 0xc420321d00, 0xc4203d36a0) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/recovery.go:45 +0x82 github.com/ubccr/mokey/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x131a400, 0xc4203d2760, 0xc4203d28c0, 0x7f6890d59af8, 0xc42030a480, 0xc420321d00) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:33 +0xa5 github.com/ubccr/mokey/vendor/github.com/urfave/negroni.(Negroni).ServeHTTP(0xc4203badb0, 0x1322280, 0xc42011c8c0, 0xc420321d00) /user/aebruno2/go/src/github.com/ubccr/mokey/vendor/github.com/urfave/negroni/negroni.go:73 +0x100 net/http.serverHandler.ServeHTTP(0xc4203aaea0, 0x1322280, 0xc42011c8c0, 0xc420321d00) /usr/local/go/src/net/http/server.go:2619 +0xb4 net/http.(conn).serve(0xc420085680, 0x1322c40, 0xc42030a2c0) /usr/local/go/src/net/http/server.go:1801 +0x71d created by net/http.(Server).Serve /usr/local/go/src/net/http/server.go:2720 +0x288

Please Advice