Giter Club home page Giter Club logo

Comments (10)

marcemira avatar marcemira commented on May 16, 2024

Same here... :/

from ember-simple-auth-token.

jpadilla avatar jpadilla commented on May 16, 2024

Hey thanks for reporting and sorry for the trouble. I'll look into this today. I'm in the process of rewriting how this is packaged using ember addon <addon-name> and getting some tests done.

from ember-simple-auth-token.

marcemira avatar marcemira commented on May 16, 2024

👍 Gracias josé!

from ember-simple-auth-token.

jpadilla avatar jpadilla commented on May 16, 2024

@wieseljonas @marcemira A couple of questions to help me debug this. I just created a project from scratch and got it working.

  • Are both of you using ember-data?
  • Is the API you're connecting to on the same domain/ip? Wondering if it's a crossOriginWhitelist issue.

from ember-simple-auth-token.

wieseljonas avatar wieseljonas commented on May 16, 2024

I'll give it as spin and get back to you @jpadilla

from ember-simple-auth-token.

rbartoli avatar rbartoli commented on May 16, 2024

@jpadilla While building my app I've encountered this error.

My API is on http://localhost:3000 while the page is served from http://0.0.0.0:4200. I'm also using ember-data.

Adding the API IP address in the crossOriginWhitelist configuration property fixed the issue.

from ember-simple-auth-token.

jpadilla avatar jpadilla commented on May 16, 2024

@rbartoli thanks for confirming

from ember-simple-auth-token.

jpadilla avatar jpadilla commented on May 16, 2024

@wieseljonas @marcemira @rbartoli I've been working into refactoring this to use the new ember-cli's ember addon feature as well as adding tests.

I've created a new branch, refactor with the current progress which seems to be working on an example project. All tests are passing.

I'd like some feedback on it and if you could try it out and report any weird things, that'd be awesome.

from ember-simple-auth-token.

jpadilla avatar jpadilla commented on May 16, 2024

Just released v0.4.0.

from ember-simple-auth-token.

alekspetrov avatar alekspetrov commented on May 16, 2024

Header is not present in request.

ENV['simple-auth'] = {
    crossOriginWhitelist: ['*'],
    authorizer: 'simple-auth-authorizer:token',
    authenticationRoute: '/',
    routeAfterAuthentication: '/photos',
    store: 'simple-auth-session-store:local-storage'
  };

  ENV['simple-auth-token'] = {
    serverTokenEndpoint: 'http://my-host/login',
    identificationField: 'identification',
    passwordField: 'password',
    tokenPropertyName: 'token',
    authorizationPrefix: 'Bearer ',
    authorizationHeaderName: 'Authorization',
    headers: {}
  };

Backend response {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MzcxOTk5NDR9.CXk7Adw19d43dWq0PsisAg1YQilxYMeIgif-rm0rEv0"}

from ember-simple-auth-token.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.