Search code examples
ember-simple-auth

Trouble upgrading to new ember-simple-auth


G'day all,

I've been having trouble upgrading to a more recent version of the ember-simple-auth module.

In particular I seem to have two challenges:

1) the application no longer transitions to the desired route after authenticating. the configuration looks like this:

ENV['ember-simple-auth'] = {
  crossOriginWhiteList: ['http://10.10.1.7:3000'],
  routeAfterAuthentication: 'profile',
  //store: 'simple-auth-session-store:local-storage',
  //authorizer: 'simple-auth-authorizer:token',
};

but it never gets to "profile".

2) I can't get the authenticated session to stick after a reload. I had been trying to use the local-store which I believed would do the trick, but it's not. Has something changed in the implementation?

The documentation seems to indicate that the configuration strings are right, but the transition and session store don't seem to be working.

Has anyone had a similar problem?

Thanks,

Andrew


Solution

  • OK. As the comments call out, there were two problems here:

    1) I had written a customer authorizer for the old version of simple-auth which didn't work with the new version, and

    2) I had a typo in the adapter code, where DataAdapterMixin was DAtaAdapterMixin.

    Removing (1) and fixing (2) fixed the problem.