Questions tagged [ember-simple-auth]

Ember Simple Auth is a lightweight library for implementing authentication/authorization with Ember.js applications. It has minimal requirements with respect to the application structure, routes etc. With its pluggable strategies it can support all kinds of authentication and authorization mechanisms.

What does it do?

  • it manages a client side session and synchronizes that across tabs/ windows
  • it authenticates users against the application's own server, external providers like Facebook etc.
  • it authorizes requests to the backend server
  • it is easily customizable and extensible

This is only a very brief overview of Ember Simple Auth's features. More detailed docs can be found in the following,

388 questions
0
votes
0 answers

ember-simple-auth custom authorizer is undefined

I have my custom authorizer file that looks like this but is not working: import Ember from 'ember'; import Base from 'ember-simple-auth/authorizers/base'; export default Base.extend({ authorize: function(jqXHR, requestOptions) { var…
Howl Jenkins
  • 323
  • 1
  • 2
  • 18
0
votes
1 answer

How can I use ember-simple-auth to set header in custom url api with ember data?

My ember data model: import DS from 'ember-data'; import config from './../config/environment'; export default DS.Model.extend({ ... useRepairPackage(repairPackageId) { this.get('session').authorize('authorizer:digest', (headerName,…
JeskTop
  • 481
  • 1
  • 4
  • 20
0
votes
1 answer

preload data after sessionAuthenticated at application route globally

After calling a custom authenticate method at login route, the action sessionAuthenticated is triggered at the application level (ApplicationRouteMixin). ie: sessionAuthenticated() { this._super(...arguments); let _this = this; return…
user3044258
  • 99
  • 1
  • 9
0
votes
2 answers

Ember simple auth and cookie headers

I am currently working on an Ember 2.4.x application and I am using ember-simple-auth with a custom Authenticator and a custom Authoriser. Upon successful authentication, the server responds with a json body containing information about the current…
makabde
  • 85
  • 11
0
votes
1 answer

Ember Simple Auth 1.0 Testing Helpers

I've recently upgraded from 0.8 to 1.0 and my app is working correctly. One thing that surprised me though and I still don't understand is how the new acceptance test helpers should be used. Previously (0.8) I could write my test like this and they…
Chris
  • 1,054
  • 2
  • 12
  • 24
0
votes
2 answers

setTimeout doesn’t work

I am working with Ember-Simple-Auth to authenticate my App against a remote server which serves me an API token which must be refreshed every 30 mins through the use of a renew token. To that aim I included an async call to ember-Simple-Auth restore…
Tchè
  • 51
  • 7
0
votes
1 answer

Failed authentification requests (401 Unauthorized) from mirage always resolves in ember-simple-auth-token

In my Ember app, I have an action for login. login: function(emailAddress, password) { this.get('session').authenticate('authenticator:jwt', { 'identification': emailAddress, 'password': password }).catch((reason) => { …
Marc-François
  • 3,900
  • 3
  • 28
  • 47
0
votes
1 answer

Ember Simple Auth 1.0 in Acceptance Tests

I'm trying to upgrade an Ember CLI app to use Simple Auth 1.0. My acceptance tests no longer work. I have configured the test suite to run against a Rails server which is a copy of my API. To log in I was doing…
AdamP
  • 207
  • 2
  • 8
0
votes
0 answers

Ember-Simple-Auth: Authenticated data not accessbile on didTransistion or AfterRender

When attempting to access authenticated information console.log(this.get('session.data.authenticated.userEmail')) => undefined from the controller or route it never seems to work when off of events like didTransition or afterRender. But is…
Hillboy
  • 472
  • 6
  • 19
0
votes
1 answer

With Ember Simple Auth, how do I redirect to a login page if user is on a page they need to be signed in to view?

When using Ember Simple Auth, how do I redirect the user to a login page if they are trying to view a page they can only access when they are signed in?
Josh Tumath
  • 135
  • 1
  • 13
0
votes
1 answer

Authentication with Ember.js 2.x

I'm new to ember.js and I find it pretty confusing to figure out which is a good way for authentication (version 2.x) since most of the examples on the web seem to be outdated. Also the documentation often doesn't come with easy to understand…
loxosceles
  • 347
  • 5
  • 21
0
votes
1 answer

Logging out a user with Custom Authenticator using Ember Simple Auth

I have a Custom Authenticator that I am using with the Ember Simple Auth (1.0.1) add-on. To log a user out, I call invalidate() on the session object. As documented, I also resolve the promise in the custom authenticator's invalidate method like…
asleroid
  • 3
  • 1
0
votes
1 answer

Emberjs and Ember-Simple-Auth: How to manually add Auth Header to Dropzone.js file upload

I'm building my first emberjs (1.13.8) webapp with ember cli and in general I'm new at this sort of framework. The app uses ember-simple-auth (0.8.0) and ember-simple-auth-token for token verification. Every request gets an authorization header…
0
votes
1 answer

Send a DELETE request to serverTokenEndpoint using ember-simple-auth

I can set a custom endpoint for ember-simple-auth to obtain tokens. It sends an HTTP POST request to the custom endpoint. export default OAuth2PasswordGrant.extend({ serverTokenEndpoint:'/tokens' }); I'd like to add a custom invalidate method…
Josh M.
  • 387
  • 4
  • 13
0
votes
1 answer

ember simple auth save user profile in a session

I can't find out why the method set of session this.get('session').set('name', name); does not persist after having reloaded the page. I followed exactly what was mentioned here. My code //controllers/authentification.js import Ember from…