You could inject the store service, retrieve a record and change it.
import Service from '@ember/service';
export default Service.extend({
afterLogin(userId, sessionData) {
let store = this.get('store');
let userProfile = store.peekRecord('user-profile', userId);
userProfile.set('foo', sessionData.foo);
},
store: service(),
});
But I don't understand why you want to set session related data on a model record. If it's just about consuming the data associated with session, you could import your service where needed and access it directly. If user profile needs to be updated after login (e.g. setting a last login property), api should be responsible for that in my opinion.