Working A Bit with AdonisJS Social Auth

In this stream, we worked on fixing an issue I have on the new, not yet released, Jagr site where I didn't account for changing emails within my social auth.

Published
May 17, 22
Duration
1h 0m

Developer, dog lover, and burrito eater. Currently teaching AdonisJS, a fully featured NodeJS framework, and running Adocasts where I post new lessons weekly. Professionally, I work with JavaScript, .Net C#, and SQL Server.

Adocasts

Burlington, KY

Transcript

Looking for something specific? Feel free to search the page for keywords to find a specific portion of the live stream that interests you most.

0:00

how's it going everybody it's been a little bit um so moved into the new house got all

0:05

situated here got internet finally and so at the old house my entire life i've

0:12

always used a wired internet here i am trying out t-mobile home internet

0:19

which actually uses lte and 5g signals to receive

0:24

the internet reception and then it has a little gateway box that receives that and

0:31

thank you ahmed thank you for confirming that and i had issues throughout the past week with it actually overheating

0:38

because i had too much connected to it so i had to get a router so

0:43

so once i got that hooked up and i get everything hooked up to the router and turn the wi-fi off of the gateway it seems like it's it's stopped overheating

0:51

because whenever it overheats the internet just completely goes to put and it stops working so

0:56

um cool i wanted to just kind of stream for a little bit here to test and make

1:02

sure that everything's working okay with that uh and i figured while we're here

1:07

um i was talking with the free tier on discord and he ran into an issue and

1:12

i realized hey i'm running into that same issue or i have that same bug in my application so

1:18

here we are with the new not yet released jaeger site which the name will actually

1:24

be changing whenever i do release it but the ultimately the issue is so

1:32

i have a google and a github login and i believe i streamed that whenever we set

1:37

that up um and whenever users log in all that works

1:42

okay so if i come in here and i'll log in with my github it should work okay i'm not quite sure if i'm actually yeah

1:48

so it works okay um obviously i have an issue with my image but that's

1:54

completely separate from what we're going to be focusing on here today but the issue is so whenever if we dig

2:01

into that code here i believe i put that inside of a service so let's go into services http

2:08

auth social service um so we have our get user and then we have

2:13

the find or create user and that's where the actual issue is so we come down to here we can see

2:20

that i am querying for the user and if the user is not found then i'm going ahead and creating that user within my

2:26

database the issue is i'm using email to check whether or not that user exists already in my database

2:33

the reason why that's an issue is what if i go into i'm not going to do this but what if i go into my github and i

2:38

actually change my email well whenever i go to log in the next time i'm going to be receiving that new email

2:46

via the social auth and whenever i do the lookup inside of my database

2:51

i'm not going to have that new email to find the user against so that new user

2:56

is going to get a whole other user created within our database and so we're going to get kind

3:03

of a double user scenario going on there where one's old uh and one's new but then they're going all of their

3:09

information within the application is going to get siloed between those two so

3:16

the easiest way to go ahead and fix that is to and i just closed it

3:22

um so if i open up table plus

3:28

and let me connect to my local and

3:35

if we go into our users you can see that we have the you know we

3:42

have the github access token and that's really all that we're saving that's particular to the github user beyond

3:48

their email but what we can do is we can add an additional column in here

3:53

called github id and then we can do the same for google should have a column in here for

3:59

google somewhere as well i think maybe not but we can do the same thing for google and get the google id and then instead

4:06

of checking for the email we can check against the github id or the google id

4:12

that way if the user changes any of their personally identifying information we'll still have that id to look back

4:18

against to confirm whether or not that user exists within our database so let's

4:23

go ahead and node ace make migration i might be a little rusty

4:30

here today it's been three ish weeks since i've really worked

4:36

with adonis i don't get the privilege of working with it at my day job i work with c-sharp and asp.net

4:44

so javascript's not even really my main go-to anymore unfortunately um but so let's go ahead

4:50

and do node ace make migration um let's do

4:55

oh wow is that my computer fan it is i haven't yet to hear that so i'm kind of surprised that i'm hearing

5:01

i don't have the ac on and that's about 80 ish degrees in here right now so that could be y2 um okay so nowadays make

5:08

migration and then let's do add social

5:14

auth ids and table for that should be users so that's going to create an alter table

5:20

migration for us called add social auth ids we can head into our applications

5:27

find database in here scroll yo on down to there and here is

5:34

our migration so really all that we're going to want to do is and let me take a look at that

5:41

again do i really not have take a look at the structure

5:47

github oh yeah no there's google access token okay i was completely just overlooking it so we'll do

5:52

um github id

5:58

is that man i am no that's not right like i said it's been a

6:04

minute uh integer github id

6:13

unsigned uh it's not going to reference anything actually and we'll also want to make

6:19

sure that it's nullable nullable's default but i'm going to put it there just so it's explicitly known

6:24

and won't have any possibility for confusion and then we'll do google id as well

6:33

okay and then within our down let's go ahead and remove those two columns

6:38

um again i like to do them one by one in case for any reason during development stuff changes

6:44

it's just easy peasy and it doesn't take that much extra time to go in here

6:50

and add the additional drop okay so let's give that a save and let's go

6:56

ahead and run that migration so node is migration run

7:03

i'm gonna be questioning everything that i type here today all right so that ran uh looks like it ran with a couple of

7:08

others oh yeah i prep those um that's gonna be the next stream um i started working on

7:15

that a little bit i didn't mean to but i did um okay so we have those so let's go ahead

7:20

and add the github id and google id into our user model so let's go to models user

7:28

and let's see let's put these right before the access tokens so right here

7:34

column uh uh yeah public oh wow

7:41

kind of skipped over that on these didn't i i was gonna say something doesn't look right here public public it doesn't matter a whole

7:47

lot i believe public is default but uh let's put them in there so that i don't

7:53

confuse myself further next time um github id

7:59

that's gonna be should be a number i believe i have no clue what google provides it i'm gonna assume it's gonna

8:04

be a number we will find out

8:10

okay so there we have our github and google id so then let's go into

8:16

our no auth social service there it is

8:22

um and in addition to i didn't realize my dog was down by my feet and give her a

8:28

little nudge um in addition to all of this let's add in

8:35

see so we should be able to discern what provider we are using if i can remember which

8:41

property that is out of here social provider

8:47

key of social providers so it's most likely going to be that

8:53

i would imagine yeah it should be

8:58

so it should be the social provider right here so should be able to do

9:03

uh yeah yeah because that's the token key so that would be

9:10

the uh github access token and google access token right up here

9:15

so let's do const keep that naming token id or user id

9:21

yeah let's do user id equals social provider

9:27

id and we'll type that in right down here so user id

9:34

and that should be user dot id

9:41

give that a save let's go ahead and try logging in again just to see whether or not that gets

9:46

populated within our database we can go in here and verify that it's actually null

9:51

so if we come into our data side of it this one right here is my github user

9:57

it's going to be all the way at the end and yeah so it's an all right now so if we come back into here try signing up

10:04

with or logging in with our github okay we are logged in

10:10

let's come back over here and refresh and we should have some kind of an id and we don't

10:17

okay well yeah because the user already exists so so

10:23

in addition to that since i already have users within the production database using this what i'm going to do is just

10:29

a next time the user logs in let's check to see if that's missing if it is

10:34

let's go ahead and populate it in so if jager user uh let's go ahead and do an else

10:42

if not jager user

10:49

[Music] yeah not yanker user dot

10:56

user id key that should have a key behind it

11:02

because that's not the actual id there we go user id key

11:10

it's not very pretty but it should work and that just oh i really did it

11:18

user id key there we go okay if that's missing then let's go ahead and just populate it

11:25

in so um jager user dot or not dot user id

11:32

key equals user dot id and then jager user dot save

11:39

um oh wait yeah i'll wait okay let's test that one more time

11:48

okay sign in bam

11:56

looks like it went okay and there is our github id right there so that seems to be working okay uh

12:03

doesn't look like i actually have a google user because all of those

12:10

access tokens are null but since the email is already in here

12:19

it should find that and just populate the google id onto that particular user so

12:27

let me go ahead and try that real quick see if this is working oop nope

12:33

insert into users and oh yeah that's definitely out of uh

12:40

intensive range so okay we're going to need to change that to

12:48

what is that a big let's head over to

12:56

the adonisjs documentation take a look at what options are i believe it would be big in but

13:03

i am not 100 certain so uh let's see we'd be wanting to look

13:09

for migrations here tom model factories do do do i am

13:16

blind i know it's right here should keep my migration all right

13:22

actually this might be in the reference

13:27

hmm

13:34

been a while since i have looked at the migration stuff

13:41

okay oh no i'm back at context how did i get the context

13:47

schema migrations altered table

14:00

okay um go ahead

14:06

it may not be listed on the adonisjs documentation let me go into

14:11

connect.js i know this is really small let me go ahead and it's hard for me to even read

14:16

it let me zoom in a little bit here uh so

14:22

schema builder i believe this is the right spot so there's big ant

14:33

uh note that it's returned as a string in queries because it can't parse them

14:38

so that is one thing to note so we could just save it as a string and call it a day

14:45

but uh we'll try big and we'll see if that works so let's head back into our migration

14:50

before let's go ahead and roll back real quick node ace migration

14:59

roll back okay and let's change you to

15:06

big it may be beneficial to just go ahead and do that for github as well because

15:13

with the amount of users that github has it may eventually reach that point as well

15:19

so let's go ahead and just try that with that as as well

15:25

okay so node ace migration run if this doesn't work then i may just go

15:31

ahead and save them as a string and call it a day because why not

15:36

it'll still work it'll still be unique within our system

15:41

all right here we go and so let's try

15:48

github first all right looks all good there let's verify that

15:53

the so this column should look the exact same refreshed and there it is

16:00

only difference is that whenever we try to query that it's going to come up as a big int so the main thing would be

16:06

whenever we change this to checking for the um

16:13

github id we want to verify that that user is actually found

16:19

since that will be compared as a string and it still does not okay out of range of big n as well

16:26

all right um like

16:40

hesitant to do a double

16:46

let me just go ahead and do a string let's stretch string

16:52

let's do node is migration roll back

16:58

okay

17:04

strange string that would mean that unsigned is no

17:09

longer applicable there we go give that a save all right i'm going to go ahead and go

17:16

back into the user model let's change these from number to string um since we were using big in and it's

17:22

returned back as a string that might have been a string regardless anyway even if big n did work

17:31

not 100 sure how that would work and let's go ahead and run that migration again

17:36

it's one of those trial and error type things you think it might work a particular way but you're not quite sure until tree until

17:41

you try it all right so there we go got our migrations running come back in here refresh that should be empty it is let's

17:49

come back into our application let's go back let's go ahead and try google first since it's been

17:58

failing cool so that is working we can go ahead refresh here oh it created a

18:04

new user ooh that's not what i want

18:10

see it should have found this one so now that email's not unique

18:18

peculiar

18:23

okay we'll look into that here in a second let's go ahead and try github

18:29

just verify that that's working

18:38

okay all right yeah so that one worked okay that wouldn't create a new user on us

18:43

curious as to why google did so

18:51

it could have now should have should be checking based off of the id or the email there

18:59

let's double check so that would be the social service

19:10

oh we're not null token key okay

19:15

see so we should be able to just go ahead and get rid of that as well so if the email's in our system why not right

19:22

why separate the user out um because if they're

19:39

okay let me go ahead save that let's delete that extra user that got created here

19:50

okay ah created a profile form too uh let's see

19:57

so go in here let's delete that row come here and delete that row

20:05

okay there we go all right let's so let's uh let me double check make sure i saved

20:10

insanity check there yeah all right so let's come back into here and let's try that one more time so let's sign out

20:18

i'll do some additional thinking behind this to make sure that this is safe to do here uh it would

20:24

definitely be safe if i had an email verification like you sent off

20:30

uh verify your email address you know but there is that slight possibility of

20:38

since i'm not requiring this particular user to have that particular token id of somebody signing up for a particular

20:44

email and then somebody else coming along that actually owns that email and using a social provider but

20:51

i don't think that would happen very often and i do want to add an email

20:58

verification step within here anyway so once that is happening then this would be a safe bet

21:05

to do okay that was a long ramble sorry so

21:10

let's go ahead and try this again me thinking out loud all right there we go

21:21

and it doesn't look like a brand new user got created and there is our google id

21:27

up on that correct user cool

21:39

so then the last thing to do would be we'd want to switch this to

21:48

let's see here

22:03

trying to think if there's a way to where i could just switch this to checking the id but i don't believe so

22:09

because we still have all those users that signed up that we don't have the id within the

22:14

database for so let's go ahead and do

22:20

an or where

22:25

user id key

22:30

is user.id

22:41

okay so now that should work as well um

22:46

and in order to test that i think i might just uh comment that out for right

22:52

now and put oh did i capitalize that oh yeah well yeah or in front of it okay so there we go so let's go ahead and test

22:58

this out with this commented out to just make sure that the system is finding

23:03

the user okay by their particular social auth id

23:09

let's go ahead and sign in again let's sign in with get uh google

23:16

tell us the end of a work week refresh here all looks good no extra data added in

23:23

and we were successfully logged in using just the uh social auth id so that is working

23:31

okay for google let's go ahead and try this again for github

23:38

okay logged in okay there

23:45

and no extra data added in for that either so that's working as intended

23:51

let's go ahead and i'm gonna have to think through this a second on whether or not i actually do

23:56

want that and where not null

24:01

out i definitely want the emails to be combined

24:10

into you know so like i have i already had my email for my gmail signed up

24:15

obviously but whenever i actually went through with the gmail social auth i do want that same user to be bound to the

24:21

gmail social auth or google social auth i think the safest way to do that would

24:27

be to add an email verification step to the email password login that way

24:34

i know for a fact that they own that email address and it's not just some random person trying to pick out

24:40

some user's email address and then whenever that some user comes along to sign up now we have

24:46

a password that one user owns and a social auth login another user owns that wouldn't be a very good scenario so

24:53

but i do definitely want those records combined

25:00

so yeah for right now though while i don't have

25:06

that uh email verification system in i think i feel safest

25:15

having those separated or even just disallowing a social auth system and then saying log

25:22

in with your email and password and then add it into the back end whenever the user's already logged in

25:29

that would actually probably be the safest bet is to say if you already have an account with us

25:35

and it's not github or google then you need to go into your settings

25:41

and add that i like that better that that sounds like a better approach

25:48

so we will add that back in without was that aware not

25:55

no i guess it would be

26:03

well yeah no token key that should definitely work

26:11

yeah

26:18

okay so then we'll put that back in and now if

26:27

i remove the github id there

26:32

oh wait i also need to remove the google app oh no okay that's not there

26:42

why isn't that there shouldn't be there

27:01

now it'll be there there we go

27:08

okay so let's go ahead sign out

27:14

um and let's disallow the user from actually signing up with

27:20

google whenever they have the email already on our system but it's not bound to

27:26

uh a particular social auth and it will force them to do that within the settings that way we know that they

27:32

have access like that that is that user um so

27:40

what would be the best way to do that

27:48

so if they don't have a user that gets created we definitely want to allow that if they don't have

27:58

see so at this point we just have the token key created within our database for those

28:03

pre-existing users so we'd want to check the token key

28:09

now let's do it separate else if

28:19

and then let's check the token key on that so if not

28:28

if they don't have the token key saved then we want to disallow the login

28:33

and let me see whether or not i can just return null from this probably not i would imagine that's

28:39

expecting user yeah it is so

28:45

all right i'm gonna try throwing an error here and just seeing how i'm handling that

28:50

i may need to do this more gracefully or wrap this in the try catch or something like that so let's see throw

28:57

new

29:02

unauthorized exception i don't know if that would be the right exception or not but we'll go with it for right now um

29:13

which will be the verbage for this

29:20

an account

29:53

i don't know that works for right now we'll see whether or not that works for what we need

29:58

all right so let's come back in here so it's a google that should now break it shouldn't work

30:04

let's see what happens it worked it didn't didn't break

30:10

maybe i didn't save oh okay so

30:16

um

30:31

that's odd it should definitely have reached here see whether or not we can see that

30:36

exception on our server we got a bunch of stuff um

30:42

no no we can't

30:47

all right well then what's uh

30:53

[Music]

30:58

why what the token key is still null

31:04

that is or no never mind that be down here so it created a new user so it means it

31:10

didn't find it so that means that what i'm actually looking for is up here so it didn't find

31:16

the email where oh we're not at all yeah okay so we do want to actually take that out because we have now this check here

31:22

so can't check if you know get the user back so all right let's try that again so i need to go

31:27

back in here delete the profile first boom

31:33

and then delete that user again and all right

31:40

let's try this again all right sign up

31:47

google should get back in there let me actually open up the console well shoot

31:53

it worked workday okay what did you create another user on me again

31:58

yeah sure did

32:13

hmm oh i just forgot to switch this to an or where that wouldn't find any user

32:20

there we go all right now it should work let's uh let's run through that this is why i shouldn't stream on a

32:26

friday night at the end of a work week uh let's see profiles

32:33

bam users bam all right let's try this one more

32:38

time let's go back into here sign out cool

32:44

sign in let's hit the google button and

32:49

there we go now i want that to be graceful i wanted to

32:55

go back to that page and just show an error i don't want this to happen um

33:03

so let me see where i need to catch that at so this is called by this it returns back this

33:10

so i would say to catch it right here

33:41

okay uh yeah

33:57

there we go okay so now we should be able to catch that now we need to see what calls get user

34:03

that's probably inside of the controller i would imagine so let's jump back into our social controller here

34:10

yeah get user so we have all right to route auth sign in show

34:17

and let's do um so we got that

34:25

let's just grab the message out of there so let's do a see we need session

34:35

and um [Music] the off page has a particular

34:45

flash that it's looking for i believe it might be this

34:51

i'm going to just copy and paste this in here easy enough to type that in but uh

34:57

yeah all right try just dropping that message in there

35:03

let's see if that works so now whenever that fails this should redirect us back to the sign in page with

35:10

that message instead of showing us that big old error page let's just test this and see if

35:16

that works all right so we came back here uh

35:22

doesn't look like that was the right flash message

35:31

yeah it should definitely be the right one i must say that's just not working

35:37

but it should be tested before errors oh it's errors this is different

35:48

let's try that or maybe the message was empty i don't know maybe the message isn't right

35:54

try this again as a sanity check here first though let's see what now this works okay

36:00

so the issue maybe message or the message yeah so let's uh see what we're capturing there within the

36:07

service

36:17

just spread that out and see what we got okay

36:25

uh an empty object cure qqq

36:53

okay

37:20

try this just as an error maybe

37:32

the object

37:45

all right i'm going to put this in layman's terms that i can understand here

37:59

i don't know why that wouldn't be capturing that

39:04

yeah that's even cleaner okay i like it somehow that worked better um

39:10

cool oh yeah we can get rid of that

39:15

all right let's see here so let's try that one more time

39:30

all right did i remove that console log yeah that was an error with it um

39:46

hmm it should be returning back there oh yeah but

39:52

[Music] uh social controller

39:58

message does not exist on type yes it does it's right there you have it

40:04

listed it's right there

40:18

all right let's console.log out whatever the message is here just to verify that we're getting it to

40:23

this point

40:29

and yeah yeah so it's it's the flash um

40:35

which is weird because i thought i had that working

40:42

see the other one that we had there was air maybe that's right

40:50

because now if i try to log in

40:56

the bad password it shows up it does work

41:02

um let's see oh is it

41:13

take a look at that one more time not foreign my goodness yeah so it's

41:21

errors inside of form

41:29

there we go that should work blame my previous soul for not making that self-explanatory there all right

41:38

let's try that one more time there we go this is the message

41:43

so let's plop that on there get the actual message up um i'm gonna ignore that because that's visual studio code

41:51

that's one thing i liked about um uh webstorm is it

41:56

the typescript stuff was always up to date you didn't have to worry about it because it was very good at keeping that up to date

42:06

um so let's see let's where's our message at access was denied request expired

42:14

this is the message

42:25

the email see now i need to think up a nice message for this to be

42:33

let me break this down because this is not going to be a short message i imagine

42:39

the email time to this provider

42:50

already has an ec no that's not good

42:57

this email is already tied to an

43:03

account please log in to your

43:08

account and uh

43:15

assign and

43:20

add

43:27

social provider

43:33

please log into your account and through your

43:39

settings not great but i'll workshop it let's just see how it comes back

43:48

this email is already tied to an account please log into your account and add google through your settings

43:54

good enough um

44:01

using your password

44:08

okay so that's good enough on that front um now what we want to do is

44:13

we should pretty much just be able to add these two buttons into the settings page um

44:18

and then we can add an additional check to see whether or not the user is authenticated and

44:24

whether or not the email matches so if that if those two cases

44:29

are good then we are going to go on this

44:35

thank you for confirming that no um

44:41

um nahim sorry about the name butcher

44:46

there but thank you for confirming that the full hd and 60fps is working okay i

44:51

appreciate that um so let's go ahead and add those

44:56

buttons in so that would be let me collapse this stuff up resources views off

45:04

sign in all right scroll down i should have these commented out so that i can easily

45:11

or log in with i don't ah okay so i'm just gonna go ahead and grab

45:16

these here that is that i think i need to grab

45:22

that div too no that div is this one yeah okay

45:28

and then let's head into the settings page that's inside of studio

45:36

settings index i'm going to have to go to this page to actually remind myself what it looks like it's been a while

45:47

okay yeah oh wow none of the uh

45:53

well i might have broke that while i was dealing with the google stuff but that was working

46:00

probably overwrote it from whatever google set it to so let's see here

46:06

yeah just add another one of these sections here for social authentication or social providers

46:12

and that should do it so let's see where would be best so change username

46:18

update email email notifications

46:24

do it after update email i guess update email

46:31

okay

46:49

uh add a social provider to your account

46:55

volume is low i think i can fix that let me try to is this

47:01

any better here is this any better i need to try to not talk louder and

47:07

talk at the same cadence than i was before

47:12

last thing i want to do is turn the volume up and talk louder all right so

47:17

add the social provider to your account uh

47:27

add a social provider to your

47:32

account so you can log in and

47:58

all right there we go that should be fun and okay

48:06

uh this shouldn't need a form at all should just be able to plop these buttons in here the form

48:13

section is just purely visual uh structural i mean and then

48:18

yeah i'll go ahead and leave twitter in there i got an email a little while ago about twitter changing their

48:24

application process so maybe i'll be able to get that eventually um

48:31

um cool so then those buttons should show up right here uh i'd prefer them to be

48:38

vertical but i'll work on that later uh main thing is we need to add the callback for this

48:46

whenever we click on it to check to see whether or not the user is authenticated if the user is authenticated then

48:53

we really just need to check whether or not they have that email so right here is where we're going to be working again

48:59

i just pretty much need to make that faulty if uh well okay so let's see we do need to provide in the user

49:06

through here so i guess this would change up a little bit with it social provider because

49:14

well no so this is extending the http service so

49:19

uh i have access to everything right here so that's that makes that nice and easy so

49:24

we have our user here our jaeger user here so let's do const

49:31

auth user equals this ctx

49:36

off user okay and so that can be knowledge so else if

49:47

not [Music]

49:57

let's see end of day if statements are always

50:02

i don't know why but they always trip me up um let's see off dot

50:09

email does not equal

50:14

user dot email

50:24

and

50:29

let's see would that work also this off user so if the authenticated user

50:36

if their email does not equal the user email well in that case we would actually want that to be a

50:42

different error altogether because there you're trying to

50:47

go against with a different one so if not uh auth user

50:58

for that one and then we'll do a separate check for what i was just trying to do so else if not um

51:05

user email does not equal uh user.email

51:14

then we get into a bit of a finicky state where we have

51:20

somebody trying to attach

51:28

well i don't know if that actually would be an issue because say i sign up here

51:35

and i go i log into google i i'm confirming that i have access to

51:40

that google account because i'm able to log into it so if the emails don't match

51:46

what's it matter still the same yeah

51:52

so okay so pretty much just stating whether or not if the user's not logged in then we

51:58

want to perform that previous check to see whether or not they have a social authentication token otherwise

52:04

we're just going to go ahead and merge in their social auth information with their current user information

52:09

i think that sounds right so before i do that let me go ahead and just do a sanity check here make

52:15

sure i didn't break anything with how that's working previously so

52:20

google should come back get in there yep okay

52:27

come back over here sign in come down to settings

52:34

and of course uh this shouldn't error out but if for any reason that it does i believe i'm going to want to add some

52:41

kind of messaging in here well actually it would redirect me back to the login page wouldn't it which would redirect me elsewhere

52:48

yeah that's a that's uh

52:55

yeah so that could use some work so maybe it's that does need a separate

53:00

endpoint um but let's go ahead and see whether or not that actually worked on the database

53:07

side yeah it worked on the database side so here now we have our google id here now

53:14

we have the google access token it

53:20

did break my avatar previously but it shouldn't any longer

53:25

or wait did it no it shouldn't shouldn't have that was probably just broken before

53:31

for some reason uh but okay yeah so this seems working okay

53:37

and the next thing that we would pretty much want to do is to disable that because

53:43

you should be able to add more than one google account um

53:51

let me see whether or not we have the should have the auth well yeah you have the auth user there so

53:58

[Music] let's see here so

54:11

i'm gonna all right let's let's see here if

54:17

um off dot user

54:22

dot

54:28

google access token

54:39

and let me do that

54:48

there we go now i don't need to do it twice

55:02

all right

55:10

i should have refreshed but yeah so now that's not doing anything

55:16

whereas github still is so let me go ahead and

55:52

okay let's do a sanity check there so one should be disabled one should not

55:57

google is this one is not and it would be working a-okay as well so

56:03

cool now obviously we don't want that hover and it should look a little different

56:36

okay otherwise it's just going to be text gray i don't know 400.

57:13

yeah um oh

57:24

okay let's try this there we go and then probably put a message this is

57:29

already bound or this is already tied to your account or something like that

58:26

would probably be good to save the github and google email addresses too that come back with that user

58:32

just in case they are different i'm not going to do that tonight but you'd also be able to state that here as

58:39

well and then we could add in like a detach button as well

58:44

under here instead of just saying that it's already set up that way if they need to switch their account or whatever

58:50

they could detach it and then reattach a different one and really that wouldn't be too much work it would just be a matter of

58:55

clearing out those particular database columns so you would clear out the google access token and the google id

59:01

and then as far as our application is concerned you know that

59:07

the account's no longer tied to that social provider

59:23

there we go so i'll work on that um off screen to finish it up but uh

59:30

i wanted to at least stream a little bit here to see make sure everything works okay um

59:36

and we'll move forward from here um sorry i wasn't at my best today it's been like i said a couple of weeks since

59:42

i've actually worked with adonis and it's also a friday evening so um i'm

59:47

gonna relax y'all have a great weekend i'll probably stream a little bit tomorrow uh there's some additional

59:53

stuff that i want to get done and i'm hoping to be able to get this site out i was hoping to get it out last weekend

59:59

but stuff happened

Join The Discussion! (0 Comments)

Please sign in or sign up for free to join in on the dicussion.

robot comment bubble

Be the first to Comment!