mirror of
https://github.com/volatiletech/authboss.git
synced 2025-02-03 13:21:22 +02:00
require SessionStoreMaker
and CookieStoreMaker
at startup instead of panic
ing on the first hit
This commit is contained in:
parent
586415a7db
commit
c2e185a9b8
@ -45,6 +45,12 @@ func (r *Register) Initialize(ab *authboss.Authboss) (err error) {
|
||||
return errors.New("register: Need a RegisterStorer")
|
||||
}
|
||||
|
||||
if ab.SessionStoreMaker == nil {
|
||||
return errors.New("register: Need a SessionStoreMaker")
|
||||
} else if ab.CookieStoreMaker == nil {
|
||||
return errors.New("register: Need a CookieStoreMaker")
|
||||
}
|
||||
|
||||
if r.templates, err = response.LoadTemplates(r.Authboss, r.Layout, r.ViewsPath, tplRegister); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user