Jhipster build with Websocket and Vue, not authenticating or log in

Viewed 128

I try to build using Jhipster using this setup, run server (gradlew -x webapp) and frontend (npm start) successfully, but couldn't log in with the default admin/user.

setup:

  • application type > Monolithic application
  • base name application > jhipster
  • spring webflux > N
  • package name > com.mycompany.myapp
  • authentication type > HTTP Session Auth (stateful)
  • database type > SQL
  • production db > MySQL
  • development db > MySQL
  • cache > Ehcache
  • Hibernate 2nd Lvl cache > Y
  • lib mgmt > Gradle
  • JHipster registry > No
  • Websocket using spring websocket
  • frontend framework > vue
  • admin UI > Y
  • theme > default
  • int. support > Y
  • Junit & Jest > cypress, gatling, cucumber
  1. what is wrong with the setup or do I need to configure something more?
  2. Can I replace the frontend vue theme with vuetify?

[Edit]

So far; I don't have problems logging in (authenticating) with Jhipster build with angular as the front end. NPM version 7+ JHipster version 7.1.0

After setting up with the standard blueprint, I run the server with

gradlew -x webapp

and another open terminal to run the vue front end

npm start

The frontend page open at localhost:9000 and backend at 8080. Whenever I try to logged in, the log at server look like this.

Screenshot

and the log for the server terminal:

2021-07-14 12:29:37.488 DEBUG 20748 --- [ XNIO-1 task-5] m.c.app.web.rest.AccountResource : Enter: getAccount() with argument[s] = [] 2021-07-14 12:29:37.489 DEBUG 20748 --- [ XNIO-1 task-5] my.cermatapp.app.service.UserService : Enter: getUserWithAuthorities() with argument[s] = [] 2021-07-14 12:29:37.489 DEBUG 20748 --- [ XNIO-1 task-5] my.cermatapp.app.service.UserService : Exit: getUserWithAuthorities() with result = Optional[User{login='admin', firstName='Administrator', lastName='Administrator', email='admin@localhost', imageUrl='', activated='true', langKey='en', activationKey='null'}] 2021-07-14 12:29:37.489 DEBUG 20748 --- [ XNIO-1 task-5] m.c.app.web.rest.AccountResource : Exit: getAccount() with result = AdminUserDTO{login='admin', firstName='Administrator', lastName='Administrator', email='admin@localhost', imageUrl='', activated=true, langKey='en', createdBy=system, createdDate=null, lastModifiedBy='system', lastModifiedDate=null, authorities=[ROLE_USER, ROLE_ADMIN]} 2021-07-14 12:29:37.575 WARN 20748 --- [ XNIO-1 task-3] o.z.problem.spring.common.AdviceTraits : Forbidden: Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-XSRF-TOKEN'. 2021-07-14 12:29:37.576 WARN 20748 --- [ XNIO-1 task-3] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.security.web.csrf.InvalidCsrfTokenException: Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-XSRF-TOKEN'.]

0 Answers
Related