Inflow-Music-Co / inflow-music-react

Inflow Music react front-end
inflow-music-react.vercel.app
MIT License
2 stars 0 forks source link

new user login flow with Magic Link #8

Closed 0xmovses closed 3 years ago

0xmovses commented 3 years ago

We are trying to onboard users who are not used to using crypto in an effortless and seemingless way. We want the user to be able to click one button which at once connects their wallet and logs them in. We also want to abstract away any wallet functionality and all use of Metamask Wallet Extenstion.

The current version of the app uses Metamask as the wallet provider. MagicLink enables passwordless login and wallet provider service with a backend and frontend SDK.

We are going to implement a new user login flow using fortmatic-magiclink like this:

New User Login Journey

part I track user login ID

part II

part III enable change to Artist user type

part IV, UX upgrade

Tasks for Degen

bugs / fixes

derivativedegen commented 3 years ago

created branch magiclink_login to start work on part two... please pull from git when starting work on part one @Daniil-MERN-Dev

derivativedegen commented 3 years ago

I made the modal and realized a lot of the info we already had in the user profile is reused such as address, city, country, zip, profileImage. I think having a modal pop up asking for a lot of the same info seemed like bad UX imo.

So for simplicity I added a button to toggle "apply for artist" mode and then those additional artist fields appear in the account settings form with an "Apply" button that has a handler sending a POST request. This way there's no need for redundancy of info or a modal at all.

These fields are all hooked up functionally with component state. Just need someone to look over the Axios POST request to make sure it's wired up properly in regards to the API endpoint & database fields. Also need the current getData() function to retrieve this new data and populate on page

derivativedegen commented 3 years ago

https://magic.link/docs/blockchains/ethereum

Leaving this here for later.

derivativedegen commented 3 years ago

@Daniil-MERN-Dev @rvmelkonian

i did the latest server git pull and magiclink_login branch git pull before beginning today, and now im getting 1 error and 1 infinite loading bug. please let me know if this is the same for you when recreated.

1) error -- when clicking logout i get a "Error: Actions must be plain objects. Use custom middleware for async actions." and it wont let me log out. I know you're working on the login function so i assume this will be patched.

2) bug -- when clicking on any artist, the page is stick in loading forever, none of the components load and the green loader is shown. I'm not sure what this is stuck up on. I've attached a console log with errors. I assume this has to do with price fetching and using metamask which we arent anymore.

Screen Shot 2021-09-01 at 7 14 21 PM
derivativedegen commented 3 years ago

Done:

Need:

Summary of Work & Questions

@Daniil-MERN-Dev please do a git pull before working on this @rvmelkonian please let me know about the above questions/needs list

derivativedegen commented 3 years ago

@Daniil-MERN-Dev update notes: temporarily added "CONNECT" button since i cannot login with magiclink, please disregard. i will remove it once i have magiclink functional.

@rvmelkonian could you please add my email derivativedegen@gmail.com to the app DB with artist and admin permissions so i can successfully validate with magiclink and also access all areas of the app?

derivativedegen commented 3 years ago

Magiclink login flow complete User data from server fetch and load during login complete Magicwallet access works and displays user's wallet address + token balance for current 2 hardcoded tokens (LTA & HFT)