In my auth-jwt.service I have:
return this.http.post(SERVER_API_URL + api/authenticate
, data, { observe: 'response' }).pipe(map(authenticateSuccess.bind(this)));
I've set SERVER_API_URL as '' (empty).
However, angular sends the request: http://localhost:4201/api/authenticate, which works fine. But my server app is on localhost:8080
I can't make sense of it
When I set SERVER_API_URL to "http://localhost:8080", request seems to be sent, but in response the auth JWT token is missing.
I also have the backend in a separate app from jhipster.
JHipster/Angular app: yo-rc.json:
{
"generator-jhipster": {
"jhipsterVersion": "3.7.1",
"baseName": "standard",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8080",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Memory",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"buildTool": "gradle",
"enableSocialSignIn": false,
"rememberMeKey": "xxxxx",
"useSass": false,
"applicationType": "monolith",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en"
],
"skipUserManagement": false,
"skipClient": true,
"skipServer": true
}
}