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
2
votes
1 answer

EmberJS retrieve current user from ember-simple-auth authenticator

Issue: I am trying to retrieve the current user logged in from ember-simple-auth by extending ember-simple-auth/authenticators/base. I just want to create a function called currentUser() that will return the username but I get the error whenever I…
IFH
  • 161
  • 1
  • 2
  • 14
2
votes
1 answer

Ember ember-simple-auth override routeIfAlreadyAuthenticated in application route

How do you override the routeIfAlreadyAuthenticated? And once that happens, how can it transition to a route with a dynamic segment? I realize I can override sessionAuthenticated; and in that ways override the functionality of…
user2517182
  • 1,241
  • 3
  • 15
  • 37
2
votes
1 answer

Authenticate user with external url, Ember Simple Auth after callback with token

I use an external service for authentication Stamplay .. To authenticate with username and password, I have to make a post in ${config.host}/auth/v1/local/login The callback for this post contain the token, so I created a custom authenticator to…
ridermansb
  • 10,779
  • 24
  • 115
  • 226
2
votes
0 answers

Ember-simple-auth: Use Custom cookie session to store additional token

Using: ember-cli v2.5, ember-simple-auth v1.1.0 I got trouble understanding if I can properly store additional token inside a custom ember-simple-auth's cookie based session-store. I'm trying to store a shopping-cart token to be sure it survives…
Benjamin Lg
  • 123
  • 1
  • 8
2
votes
2 answers

Emberjs: How to redirect to the last accessed route after session invalidated

We are using ember-simple-auth with cookie authentication and we want to redirect to the last accessed route after we login again when the cookie expires. We manage to do the redirection for the following scenarios: Not authenticated and try to…
Panagiotis
  • 201
  • 3
  • 16
2
votes
1 answer

Refresh access token ember

My app access token expires every 10 minutes. I'm using ember simple auth for authentication, but is a custom authenticator, because I have more than just username and password fields. I wanted to use ember-simple-auth-token, but calling to…
Howl Jenkins
  • 323
  • 1
  • 2
  • 18
2
votes
1 answer

Ember.js -- how to access data in Ember session from route

Using ember-simple-auth I set up a session and set the currentUser key equal to the user object returned from the server (edit: contents of entire session.js file): //app/services/session.js import Ember from 'ember'; import ESASession from…
Daniel Thompson
  • 2,193
  • 4
  • 23
  • 37
2
votes
1 answer

Ember Simple Auth: How to set/send multiple request headers?

I've burned quite a bit of time trying to figure this one out. My backend is Rails 4.x with devise_token_auth To authorize a request after login, I need to send multiple headers with each request, like this (verified working with curl): curl -X…
2
votes
1 answer

Session properties and JWT claims can't be accessed with embre-simple-auth-token

I have a basic working authentication system in my Ember app. I can receive a JWT and my app will log me in. The problem is that I can't access anything with something like this.get('session').get('data.id') as shown in an example on…
Marc-François
  • 3,900
  • 3
  • 28
  • 47
2
votes
3 answers

406 (Not Acceptable) when POSTing from Ember to DRF API

I'm using ember-simple-auth and ember-simple-auth-token for allowing users to log into my app. However, when I call Django Rest Framework in the backend with a POST request to authenticate using a username and password, I get a 406 (Not Acceptable)…
2
votes
1 answer

How to get session data created by Auth0 in Ember.js 2.3

I am using Ember.js 2.3 (and Ember-Data 2.3). I'm setting up a simple user auth process using Auth0. Nothing fancy yet, just installed Auth0 according to: https://auth0.com/docs/quickstart/spa/ember2js/no-api Now, my setup is pretty much exactly the…
Darshan
  • 937
  • 3
  • 15
  • 27
2
votes
0 answers

ember-simple-auth session restore not working

I have a custom authenticator which is really just extending the oauth2 authenticator so I can pass additional infomration to the API with my POST to /token. All works fine. However, when you do a page refresh and the session tries to restore I am…
LukeC
  • 111
  • 5
2
votes
1 answer

Ember simple auth 1.0.1 custom authenticator

I am updating my existing code done in ember-simple-auth: 0.8.0 to ember-simple-auth: 1.0.1 There are two problems It is not persisting a session REST Calls needed to be having withCredentials: true, not sure where I can set them. Here is my…
Aamir Mahmood
  • 2,704
  • 3
  • 27
  • 47
2
votes
0 answers

Ember simple auth sending token for every request

I'm using ember-simple-auth with ember-simple-auth-token for authentication API, and I'm having the same issue as Ember Simple Auth (with token plugin) won't add the Authorization header with the token, but I can't figure it out how to fix it. The…
user5487299
2
votes
0 answers

Catching the CORS preflight failure in ember.js

Is there a general strategy for catching CORS failures in ember.js. For example when one of the back-end servers is offline or is unreachable because the client no longer has network access. Ember-Data and Ember-Simple-Auth requests will both fail…
Angelo
  • 786
  • 8
  • 8