Giter Site home page Giter Site logo

differential / accounts-entry Goto Github PK

View Code? Open in Web Editor NEW
305.0 305.0 192.0 1 MB

Meteor sign up and sign in pages

Home Page: http://github.differential.com/accounts-entry/

License: MIT License

CoffeeScript 72.65% CSS 4.05% HTML 18.21% JavaScript 5.10%

accounts-entry's People

Contributors

alesvaupotic avatar alethes avatar ameagher avatar art1sec8 avatar benmgreene avatar bshardi avatar cfly15 avatar cunneen avatar dandv avatar dkoo761 avatar eahefnawy avatar fix avatar gaborpop avatar hellogerard avatar jakubbilko avatar musgravejw avatar noamyoungerm avatar pahans avatar pavel-kurnosov avatar pwldp avatar queso avatar rgoomar avatar robertlowe avatar ryw avatar scole96 avatar seriousm avatar softwarerero avatar spencercarli avatar splendido avatar timbrandin 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

accounts-entry's Issues

change password feature

hello , great work on this package!

i think right now the package is missing the 'change-password' feature that is present in accounts-ui though. Unlike in accounts-ui dropdown menu, there's no way for the user to change his password after he sign in. If he wants to change his password he has to logout, go through the forgot password & reset password process before he gets to change his password.

any chance change password can be rolled out? thank you!

Support sites with usernames

Support passwordSignupFields in Accounts.ui.config

  • 'USERNAME_AND_EMAIL'
  • 'USERNAME_AND_OPTIONAL_EMAIL'
  • 'USERNAME_ONLY'
  • 'EMAIL_ONLY' (default)

Add example app at /example

So that it's easier to test changes to the package without having to include it in a real development app.

And it'd be nice for new users.

Incorrect routing on sign-in

Currently the sign-in code is as follows:

Template.entrySignIn.events
'submit #signIn': (event) ->
event.preventDefault()
Session.set('email', $('input[name="email"]').val())
Session.set('password', $('input[name="password"]').val())

Meteor.loginWithPassword(Session.get('email'), Session.get('password'), (error)->
  if error
    Session.set('entryError', error.reason)
  else
    Router.go('/')
)

Shouldn't that Router.go('/') be:
Router.go Session.get('entrySettings').dashboardRoute
?

RFC: i18n for accounts-base

The accounts-base package unfortunately does not throw error codes but english texts in case of an error. This is not directly accounts-entry's problem but we could work around it. There are a few calls to Session.set('entryError', error.reason) which could be replaced by Session.set('entryError', (i18n err.reason.replace ".", "") || err.reason) and a translation could be provided like "Email already exists": "Email ya existe".

Do you think it makes sence to have this in accounts-entry? Should a provide a pull request for this?

Signup code

This package is really useful, but I'm having some problems with the Signup code.

I'm using this code on the client:
Meteor.startup(function() {
Accounts.ui.config({
passwordSignupFields: 'USERNAME_AND_EMAIL'
});

AccountsEntry.config({
    dashboardRoute:'/',
    showSignupCode: true,
});

});

And this on the server:
Meteor.startup(function() {
AccountsEntry.config ({
signupCode: 's3cr3t'
});
});

But the signup works with any signupCode.

"otherLoginServices" helper missing

I have just updated my project and found that otherLoginServices helper, which is used on the sign in page, is missing. In a previous version it was declared in the sign-up.coffee file.

Could you please have a look at it?
Cheers,
Laszlo

Does not show username when passwordSignupFields: 'USERNAME_AND_EMAIL'

Modified /client/accounts/accounts.coffee as follows and accounts-entry front end does not show username field but still just shows email field.

Meteor.startup ->
Accounts.ui.config
passwordSignupFields: 'USERNAME_AND_EMAIL'

AccountsEntry.config
privacyUrl: '/privacy'
termsUrl: '/terms'
homeRoute: '/'
dashboardRoute: '/dashboard'
profileRoute: '/profile'
language: 'en'
showSignupCode: false

Can't tell email is optional using USERNAME_AND_OPTIONAL_EMAIL

It would be great if there was some way to tell that email is optional while using:

Accounts.ui.config({
    passwordSignupFields: 'USERNAME_AND_OPTIONAL_EMAIL'
});

Previously, I was adding a placeholder value to the email input field but this modification would be lost each time I updated the package.

Is this change possible or is there a better workaround you could advise me of?

Thanks

attempt to use accounts-entry from new project (v boilerplate) yields no email-address field in sign-up

hi,

i'm trying to use accounts-entry from a new project while using most things from meteor-boilerplate.

i was thinking i might want to use meteorite/atmosphere for bootstrap/font-awesome packages v starting with them embedded as stock boilerplate does.

i copied over all 'visible' files from boilerplate, but the sign-up form doesn't show an input field for email-address, only password.

i'm thinking something in the .meteor folder perhaps, but figured i'd run it past the pros.

regards,
tony.

Add social auth service to existing account instead of creating new account

If a user signs up in an AE-powered Meteor app with email/password and then tries to sign in later with a social auth service like Facebook (and assuming their Facebook account is using the same email address as they used when creating their account in the Meteor app) then we should add the social auth service to the 'services' collection in their 'users' document instead of creating a new 'users' document. This will allow them to then sign in to the Meteor app with either email/password or their social auth button.

This is very useful because, in my experience, many users forget if they signed up for an app with email or a social auth so they may not use the same login method each time and we don't want to be creating new accounts for them just because they signed in using a different auth mechanism.

Of course, if their Facebook account has a different email address than the one they used when signing up for the Meteor app then we have no way of linking the two accounts. So in that case, we should go ahead and create a new account like we do today. Likewise for any other social auth provider.

error messages not cleared after you switch routes

hi there.

the problem i'm facing is when the user goes on the sign in form, type his username and discovered 'User not found'. Then when he clicks the sign up link, the form still shows the same error 'User not found'. The error is not cleared.

When I dug into the source, I saw Session.set('entryError', undefined) on the 'before' calls. Strangely, it doesn't seem to be clearing the session variable.

I've double checked the issue is the same on your meteor-boilerplate app > github.differential.io/meteor-boilerplate/

0.5.1 is broken

@queso

The build you just pushed appears to be broken.

I tested on two different OSX installs, one in an isolated brand new vm only used for meteor.

  Users-MacBook-Pro:~ user$ git clone https://github.com/BeDifferential/meteor-boilerplate.git
  Cloning into 'meteor-boilerplate'...
  remote: Reusing existing pack: 421, done.
  remote: Total 421 (delta 0), reused 0 (delta 0)
  Receiving objects: 100% (421/421), 600.61 KiB, done.
  Resolving deltas: 100% (155/155), done.
  Users-MacBook-Pro:~ user$ cd meteor-boilerplate/
  Users-MacBook-Pro:meteor-boilerplate user$ ls
  README.md collections routes.coffee   smart.json
  client        public      server
  Users-MacBook-Pro:meteor-boilerplate user$ mrt

  Stand back while Meteorite does its thing
  ✓ iron-router
      tag: https://github.com/EventedMind/iron-router.git#v0.6.2
  ✓ accounts-entry
      tag: https://github.com/BeDifferential/accounts-entry.git#v0.5.1
  ✓ handlebars-server
      tag: https://github.com/EventedMind/meteor-handlebars-server.git#v1.1.0
  ✓ just-i18n
      tag: https://github.com/subhog/meteor-just-i18n.git#v0.1.1
  ✓ headers
      tag: https://github.com/gadicohen/meteor-headers.git#v0.0.13

  Done installing smart packages

  Ok, everything's ready. Here comes Meteor!

  Installing Meteor 0.7.0.1:
   * 'meteor' build tool (version 09b63f1ed5)
   * Package updates: accounts-base accounts-facebook accounts-github
     accounts-google accounts-meetup accounts-oauth accounts-password
     accounts-twitter accounts-ui accounts-ui-unstyled accounts-weibo amplify
     appcache application-configuration audit-argument-checks autopublish
     autoupdate backbone bootstrap browser-policy browser-policy-common
     browser-policy-content browser-policy-framing check code-prettify
     coffeescript coffeescript-test-helper ctl ctl-helper d3 deps
     dev-bundle-fetcher disable-oplog domutils ejson email facebook facts
     follower-livedata force-ssl geojson-utils github google handlebars htmljs
     http insecure jquery jquery-history jquery-layout jquery-waypoints
     js-analyze-tests json jsparse less livedata liverange localstorage logging
     madewith meetup meteor meyerweb-reset minifiers minimongo mongo-livedata
     oauth oauth1 oauth2 ordered-dict preserve-inputs random reactive-dict reload
     routepolicy service-configuration session showdown spark spiderable srp
     standard-app-packages star-translate startup stylus templating test-helpers
     test-in-browser test-in-console tinytest twitter underscore universal-events
     webapp weibo

  [[[[[ ~/meteor-boilerplate ]]]]]


  => Meteor 0.7.0.1: Fix failure to initialize local MongoDB server.

     This release is being downloaded in the background. Update your
     project to Meteor 0.7.0.1 by running 'meteor update'.


  => Meteor 0.7.0.1 is available. Update this project with 'meteor update'.
  iron-router: updating npm dependencies -- connect...
  headers: updating npm dependencies -- connect...
  handlebars-server: updating npm dependencies -- handlebars...
  => Meteor server running on: http://localhost:3000/

And the browser console:

  Uncaught ReferenceError: __headers__ is not defined headers-client.js:54
  Uncaught TypeError: Cannot read property 'headers' of undefined accounts-entry.js:35
  Uncaught TypeError: Cannot read property 'AccountsEntry' of undefined global-imports.js:7
  Uncaught ReferenceError: Template is not defined template.dashboard.js:1
  Uncaught ReferenceError: Template is not defined template.home.js:1
  Uncaught ReferenceError: Template is not defined template.footer.js:1
  Uncaught ReferenceError: Template is not defined template.header.js:1
  Uncaught ReferenceError: Template is not defined template.index.js:1
  Uncaught ReferenceError: Template is not defined template.loading.js:1
  Uncaught ReferenceError: Template is not defined home.coffee.js:2
  Uncaught ReferenceError: Meteor is not defined accounts.coffee.js:2
  event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
  Uncaught Error: Uh oh, no template found named "layout" page_manager.js:19

Everything is exploding! Can we find the regression, it appears related to headers.

Customize UI Template

Maybe someone else has pointed to this already, is there a way to customize the template for this packages, i would like to remove the sign up button in the sign-in template and change the markup a bit ?

Thanks

Sign up / sign in form not rendering properly - v0.5.x

hi,

My sign up / sign in forms are not rendering properly when I upgrade from v0.4.4 to v0.5.x:

image

here is my configurations in models/accounts.js:

if(Meteor.isClient){
    Accounts.ui.config({
      passwordSignupFields: 'USERNAME_AND_EMAIL'
    });

    AccountsEntry.config({
        dashboardRoute: '/dashboard',
        homeRoute: '/',
        privacyUrl: '/privacy-policy',
        termsUrl: '/terms-of-use'
    })
};

if(Meteor.isServer){
    Meteor.startup(function(){
            
    })

}

The form renders properly on 0.4.4 under the same configurations though:

image

How can i fix this?

Less obtrusive Session variable names

First off, great job on this package. It's really nice once I got it going. One suggestion I have is to use less obtrusive Session variables. Names like 'error' are likely to be used often. Something more like 'accounts-entry.errors' is what I would suggest.

No way to enter the email during signup

This only happens on signup, during sign-in the field is shown.
The element just simply does not exists, also not in the DOM tree.

Btw, the icons are also not shown - the css does not contain any url information.

image

image

I hope you can help me out here!
Nevertheless, you did a great job, it just looks nice and fits perfect to bootstrap3 theme.

Cheers!

Creating accounts-entry-semantic

I would like to make accounts-entry work with semantic-ui
@matteodem created a great package called ogno-admin, and in that direction i would like to port accounts-entry to semantic-ui
what do you think? is that alright? :)

Password reset form lacks validation

"7 character minimum password. Password must have at least one digit." is currently enforced on account creation but not when a user sets a new password (after requesting a recovery link).

Remember route after sign in

See: https://groups.google.com/forum/?hl=en#!topic/meteor-talk/cAVKlVmBEYQ

I'd like to build in functionality so this "just works" across any of my projects, I can't think of scenarios where I'd not want to return the user to the page they tried to access.

I'm thinking accounts-entry might be the right level to implement this feature.

Agree this belongs in accounts-entry?

We could make this a config variable if some of you might not want the behavior.

Uncaught ReferenceError: loginButtonsSession is not defined

I got accounts-entry working with accounts-password, then tried adding accounts-facebook accounts-google and accounts-twitter.

Now I get error Uncaught ReferenceError: loginButtonsSession is not defined

I see some FIX THIS comments at the lines...

@queso thoughts? fix?

Incorrect routing in social login

In shared/social.coffee on line 14, I think you wanted something like

Router.go (Session.get 'entrySettings').dashboardRoute

instead of

Router.go(Meteor.call('entryDashboardRoute'))

With thanks,
Laszlo

accounts-ui is still a dependency

Looks like the only remnant of accounts-ui is that we are looking for configuration variables from it still. We should change that so accounts-ui package can be removed from apps

USERNAME_AND_OPTIONAL_EMAIL breaks sign-in after sign-up

In the case where USERNAME_AND_OPTIONAL_EMAIL is enabled, and the user signs up without an email address, they fail to sign in automatically, as it tries to login using a non-existent email.

Removing USERNAME_AND_OPTIONAL_EMAIL from signUp.coffee line 125 fixes this.

entryLogo or settings.logo to set logo?

Hi, guys!

About getting logos, which one will it be? Sign-up and Sign-in use Accounts.settings.logo while Forgot-password and Reset-password both use Meteor.call('entryLogo'). Any special functionality behind it, about which I have no knowledge? I don't see where entryLogo comes from ...

Password/Email restrictions are enforced at the view layer

Password, and email validators shouldn't validate inside the the signUp.coffee, or at least it should be configurable.

Ideally the model layer in meteor would allow us to define something like:

Meteor.users.allow.insert = ()->
  if this.email != "win"
     throw new Error("view could handle this instead")

Perhaps it's possible to piggy back on autoforms validations.

Or something else, my point is that it's odd to have rules for this in one place but not globally applied.

Cheers

PS: Sorry for all the issues today D:

sendVerificationEmail not sending the verification email

This is probably not an issue and it is just that I don't understand this part of the package well enough, but I am trying to send a verification email to a user who signs up with their email address. I enter the following code on the server:

Accounts.config({
sendVerificationEmail: true,
forbidClientAccountCreation: false
});

On multiple sites, people have posted that this works for them with the accounts-ui package but I couldn't get it to work with accounts-entry. Also, once this is working, is there any other code that I need to add to accept the verification once the user clicks the link in their email?

Thanks!

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.