Code Monkey home page Code Monkey logo

redux-auth-demo's Introduction

Redux Auth Demo

Build Status Code Climate Test Coverage Issue Count

View a live demo of this project here.

Deploy this project to your own Heroku instance by clicking this button:

Deploy

What is this?

This is a fully configured redux-auth application. It includes the following:

Installation

git clone [email protected]:lynndylanhurley/redux-auth-demo.git
cd redux-auth-demo
npm install

Usage

Run The Dev Server

npm run dev

Run The Tests

npm run test

Deploy to Heroku

Assuming that your production git remote is named heroku:

git push heroku master

Project map

The following files are used in the configuration of this app:

config/
  default.json
  production.json

src/
  components/
  containers/
  app.js
  client.js
  server.js

test/
  components/
  redux/
  helper.js
config/default.json

Set the url for your development API.

config/production.json

Set the url for your production API.

src/components/

Re-usable React components.

src/containers/

Page components that correlate to react-router Routes.

src/app.js

Configure your redux store, routes, and redux-auth settings.

src/client.js

Render your app client-side.

src/server.js

Initialize your app server-side.

test/components/

Tests for the corresponding React components.

test/redux/

Tests for redux actions + reducers.

test/helper.js

Shared methods to be used by tests.

License

WTFPL © Lynn Dylan Hurley

redux-auth-demo's People

Contributors

lynndylanhurley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

redux-auth-demo's Issues

Problems running the demo

Thanks for putting this all together !

When running npm run start, i get:

> [email protected] start /home/apps/expresto/expresto-2016/frontend/redux-auth-demo
> node --harmony ./babel.server

/home/apps/expresto/expresto-2016/frontend/redux-auth-demo/node_modules/redux-auth/bootstrap-theme.js:2
ype:"submit",className:"pull-right",icon:this.props.icon,disabled:n,className:
                                                                    ^^^^^^^^^
SyntaxError: Duplicate data property in object literal not allowed in strict mode
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Module._extensions..js (module.js:478:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/apps/expresto/expresto-2016/frontend/redux-auth-demo/node_modules/babel-register/lib/node.js:138:7)
    at Module.load (module.js:355:32)
    at Module._load (module.js:310:12)
    at Function.module._load (/home/apps/expresto/expresto-2016/frontend/redux-auth-demo/node_modules/piping/lib/launcher.js:32:16)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/apps/expresto/expresto-2016/frontend/redux-auth-demo/src/views/partials/RequestTestButton.js:17:23)

npm run watch outputs:

[1] /home/apps/expresto/expresto-2016/frontend/redux-auth-demo/node_modules/redux-auth/bootstrap-theme.js:2
[1] ype:"submit",className:"pull-right",icon:this.props.icon,disabled:n,className:
[1]                                                                     ^^^^^^^^^
[1] SyntaxError: Duplicate data property in object literal not allowed in strict mode
[1]     at exports.runInThisContext (vm.js:73:16)
[1]     at Module._compile (module.js:443:25)
[1]     at Module._extensions..js (module.js:478:10)
[1]     at Object.require.extensions.(anonymous function) [as .js] (/home/apps/expresto/expresto-2016/frontend/redux-auth-demo/node_modules/babel-register/lib/node.js:138:7)
[1]     at Module.load (module.js:355:32)
[1]     at Module._load (module.js:310:12)
[1]     at Function.module._load (/home/apps/expresto/expresto-2016/frontend/redux-auth-demo/node_modules/piping/lib/launcher.js:32:16)
[1]     at Module.require (module.js:365:17)
[1]     at require (module.js:384:17)
[1]     at Object.<anonymous> (/home/apps/expresto/expresto-2016/frontend/redux-auth-demo/src/views/partials/RequestTestButton.js:17:23)
[0] Hash: 2d55e55fbcd1a84e7713
[0] Version: webpack 1.12.9
[0] Time: 17143ms
[0]                                  Asset     Size  Chunks             Chunk Names
[0]   f4769f9bdb7466be65088239c12046d1.eot  20.1 kB          [emitted]  
[0] 448c34a56d699c29117adc64c43affeb.woff2    18 kB          [emitted]  
[0]  fa2772327f55d8198301fdb8bcfc8158.woff  23.4 kB          [emitted]  
[0]   e18bbf611f2a2e43afc071aa2f4e1512.ttf  45.4 kB          [emitted]  
[0]   89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]  
[0]                              client.js  15.3 MB       0  [emitted]  main
[0]    [0] multi main 52 bytes {0} [built]
[0]     + 1960 hidden modules
[0] 
[0] WARNING in ./~/encoding/lib/encoding.js
[0] Critical dependencies:
[0] 9:12-34 the request of a dependency is an expression
[0]  @ ./~/encoding/lib/encoding.js 9:12-34
[0] http://localhost:8080/
[0] webpack result is served from http://localhost:8080/dist/
[0] content is served from ./static

And if I visit http://localhost:8080/, I just see the content of the 'static/' dir.

Any ideas on how to run the demo ?

Environment:

  • Ubuntu 15.04
  • npm 3.5.2
  • node v0.12.7

Thank you

Unknown prop `glyph`

  • i clone the repo then do the following command:
  • npm install
  • npm run test

and I've got this error.

Unknown prop `glyph` on <span> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop

Issue with Github OAuth

Hello,

I am trying to use Github OAuth but the oAuth Pop up window is showing up "Server not found" page.

github

Am I missing something!

Support for Material UI 0.15

Hi there,

Great library but I'm getting these errors when running it against the latest Material UI build (v. 0.15.0+).

Error: Cannot resolve module 'material-ui/lib/svg-icons' in /../node_modules/redux-auth @ ./~/redux-auth/material-ui-theme.js
Error: Cannot resolve module 'material-ui/lib/styles/colors' in /../node_modules/redux-auth @ ./~/redux-auth/material-ui-theme.js

Looks like the latest MaterialUI 0.15.0+ introduced a breaking change on how to reference MaterialUI components. Please see more details in their change log.

Unable to run demo on localhost

Hey, the demo is not working on local. I used npm run dev and when i click on login through github/facebook/google, It redirects to server not found. Do we have to supply anything like client id and secret for oauth to work?
Also i noticed when running the demo, the server's address is undefined on console.

image

Sign in access-token not saved to store

Hi, thanks for your work, unfortunately I'm having troubles getting this demo working with my API. This is the situation:

  • API: running on port 3002, Rails API with your excellent devise_token_auth gem mounted at v1/auth
  • the redux-auth-demo app running in local, all configured as it came except of course the API address configuration

When I try to log in by email, the redux-auth-demo app sends the expected POST request to http://localhost:3002/v1/auth/sign_in and receives a good 200 response from the API, including the following response headers:

access-token:xMzJAfkqHSEHpXfCP6_-Fg
client:mxAFZLyzZ-aaa5Jp8TNVBw
expiry:1486375170
token-type:Bearer
uid:[email protected]

Everything seems to be OK. Unfortunately, inspecting the redux store, I see that the access token does not seem to get stored anywhere. This is the store change in response to the EMAIL_SIGN_IN_COMPLETE action:

screen shot 2017-01-23 at 11 09 54

It seems the access-token is not getting saved anywhere. The impression is confirmed since no logged-in interaction with the API works and even the subsequent sign-out fails. I assume the access-token should be saved in auth.user.endpointKey, since this is what gets deleted in response to a SIGN_OUT_ERRORaction (lacking the access key, I have been unable to sign out correctly).

Can you help?

Thanks in advance and keep up the good job 👍

No styles when running demo

I followed the instructions to run the demo but got this.

screen shot 2016-02-22 at 21 50 14

It looks like styles are partly missing.

The environment is:

  › node -v
v4.2.2
  › npm -v
3.7.3

Demo on Heroku not working

When I try to login using GitHub, I get:

ActiveRecord::StatementInvalid in DeviseTokenAuth::OmniauthCallbacksController#omniauth_success
PG::InsufficientPrivilege: ERROR: permission denied for relation users : INSERT INTO "users" ("tokens", "uid", "provider", "encrypted_password", "nickname", "name", "image", "email", "confirmed_at", "last_sign_in_at", "current_sign_in_at", "last_sign_in_ip", "current_sign_in_ip", "sign_in_count", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16) RETURNING "id"

Maybe db is down.

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.