add frontend auth middleware, embed user data in frontend html
This commit is contained in:
parent
d8cb8c8fa8
commit
0fa769a248
12 changed files with 265 additions and 42 deletions
|
@ -70,7 +70,7 @@ func (app *Auth) PostLogin(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
// create a new token
|
||||
token, err := app.Token(conn).Create(
|
||||
ctx, acct.ID, *app.DBConfig.Get().InternalApplication, []string{"all"}, time.Now().Add(math.MaxInt64))
|
||||
ctx, acct.ID, *app.DBConfig.Get().InternalApplication, database.TokenScopes{database.TokenScopeAll}, time.Now().Add(math.MaxInt64))
|
||||
if err != nil {
|
||||
log.Err(err).Msg("creating token")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue