russell-hustle / lyrical

A lyrics fill in the blank game that integrates with Spotify
https://spotify-lyrical.netlify.app
3 stars 0 forks source link

Routing is kinda cringe #6

Closed human37 closed 3 years ago

human37 commented 3 years ago

I realized this issue when you visit this post and click on the lyrical link. You need to refresh in order to be redirected to the landing page. I feel like it should auto detect and redirect you automatically if you are not authenticated when you visit the URL the first time. In the console you get a bunch of 401's from the Spotify API.

evad1n commented 3 years ago

pretty sure thats cuz mark's a dumbass and has the url with his access token. but it also highlights some other problems. Instead of checking if the url is longer than 50 characters, we should check if we were referred from spotify (document.referrer). Either that or we can try and get the token on the server working but hahah gl with that.

human37 commented 3 years ago

Yeah, so we could either

  1. add code to check for that we were referred from Spotify
  2. get mark to edit the URL in his post

Idk what is easier tbh.

human37 commented 3 years ago

Also why is mark not a member of this organization

evad1n commented 3 years ago

cuz he's cringe bro... Puts it on linkedin and isn't even part of the org

evad1n commented 3 years ago

Fixed in PR #7 .