#emailsignupforms
Explore tagged Tumblr posts
notifyvisitors2 · 2 years ago
Text
How To Create Email Signup Forms? Best Templates & Examples: 5
This article demonstrates how to create email signup forms and email subscription form best practises for you to persuade prospects to enter their email addresses and open your newsletters.
0 notes
hipsterholt · 8 years ago
Text
Authentication Pt. 2
Last week I wrote a post about using Devise to authenticate your user. This is awesome and there are great libraries to incorporate the good parts of devise with new technologies. Today I’m going to write about redux-auth (https://github.com/lynndylanhurley/redux-auth), the React/Redux based node package that works with devise_token_auth out of the box.
Essentially, all you need to do is npm install redux-auth and you are golden. But, if you are like me, you have some stipulations and need to customize your app. Thankfully, it’s not that hard to do.
Once you’ve installed redux-auth, that allows you to import a whole slew of new components, from registration forms to account destroy buttons, they are all in “default”, “bootstrap”, or “material-ui” themes. Once you have the user logged in and the correct authentication stored in the cookie, you MUST import fetch from redux-auth for HTTP requests to your devise_token_auth based API. The fetch method included with redux-auth automatically includes the correct headers for every authenticated request to the API. Awesome.
One issue that I ran in to was that a User for the app that I was building requires that they sign up with an email, first name, last name, password, and password confirmation. The EmailSignUpForm included with redux-auth only has fields for email, password, and password confirmation. This was actually a simple work around. I made a form for all of the required fields and had an “onSubmit” prop. 
When a user submits, the app calls an action which makes an axios post request to the API with email, first_name, last_name, password, and password_confirmation in an object as options to the request. No need to change anything with devise_token_auth. It automatically created the user in the database and sent the confirmation email. How cool.
As awesome as all of this is and as easy as it sounds, it took an incredible amount of time to dig into documentation and debug any issues that I was having. I do love that someone has already built out a working authentication based on devise, but I also feel that it might be worth your while to implement your own build if you have a very customized application. Regardless, authentication is a really cool factor to web development. While it may be a pain at times, it’s always fun figuring out the puzzle!
0 notes