Retrieve forest user jwt token

Hello,

Until now I was retrieving for a smartview the JWT of my user via the cookie stored in the browser under the name “forest_session_data”. Things have obviously changed with version 7.9.1 and I no longer have access to this JWT. Is it possible to get this token otherwise.

Thank you.

You can get it with the appropriate service:

import Component from '@glimmer/component';
import { inject as service } from '@ember/service';

export default class extends Component {
  @service lianaSession;


  doSomething(){
    const token = this.lianaSession.authToken;
  }
}

Hi Guillaume.

You saved me a lot of time!

Great! Thanks a lot.