I am struggling with a tutorial from Hasura which I believe might never have worked. I think it might be missing a piece and I’m interested in the most appropriate way to bridge the gap between when I’ve created and what will work.
From that documentation, as well as the Auth0 VueJS documentation I have been able to create a working VueJS application that authenticates via my Auth0 project and gives me back a user profile complete with user photo and email. So that’s all working.
Following the Hausura tutorial from this I added apollo. I am now able to access non-protected GraphQL queries from my API but not protected ones. The reason is pretty clearly the code I added from the tutorial here:
getAuth: () => {
// get the authentication token from local storage if it exists
// return the headers to the context so httpLink can read them
const token = localStorage.getItem('apollo-token')
if (token) {
return 'Bearer ' + token
} else {
return ''
}
},
A console.log
shows that token
is null
even when I’m logged in. It’s pretty obvious why too. localStorage was never updated to contain a token. So of course it’s null. There’s no place in the tutorial that suggests this should be set anywhere but clearly it should.
So I did some digging and in that file src/vue-apollo.js
there is an onLogin
and onLogout
function which require an ApolloClient object and in the case of the login, also a token. This will set the local storage appropriately.
Currently, my login is done within src/view/Home.vue
like so:
login() {
this.$auth.loginWithRedirect()
// ... maybe do something here ?
},
Now if I were to add something like this after the login, it will not actually be called because of the redirect. But I think I need to add something like this:
this.$auth.getTokenSilently(token => {
onLogin(this.$apolloProvider.defaultClient, token)
}
Perhaps I need to add this into like the mounted()
or beforeCreate()
live cycle hook in my src/App.vue
? I’m really not sure how to proceed here. Does this tutorial even really work?
Furthermore, isn’t storing an auth token in localStorage a bad idea because of cross site request forgery?
https://kamagraday.com/ sildenafil
http://kamagramama.com cheap viagra no prescription kamagra
https://wardenafil.com levitra vs cialis vs viagra reviews
http://himscanada.com/ buy cialis brand online
http://himscanada.com/ buy generic cialis professional
http://withouthims.com viagra order
https://levitradd.com/ levitra vardenafil 20mg
http://canadian2pharmacy.com what pharmacy has best prices
http://cialis20walmart.com buy cialis without prescription
http://stromectolhumans.com/ buy ivermectin
https://iwermectin.com/ ivermectin over the counter
http://ivermectineffects.com/ ivermectin for humans for sale
http://ivermectinovercounter.com/ stromectol 3mg tablets
can anyone be arrested for hiv what is arthritis?
side effects for ivermectin https://ivermectinhome.com
https://zithrozpack.com/ azithromycin
american physician medical marijuana for arthritis joint pain
do i need a prescription for ivermectin https://ivermectinhome.com
noms healthcare why do i have self employed health insurance even if i didnt pay
stromectol https://ivermectinhome.com
http://albuterolotc.com/ purple inhaler
ed dysfunction treatment which arm should blood pressure be taken
ivermectin for humans over the counter https://ivermectinhome.com
pharmacie de garde fresnes pharmacie brest geant , pharmacie bordeaux cours pasteur pharmacie de garde aujourd’hui montpellier , [url=https://kit.co/ertric/viagra-super-active-sans-ordonnance-belgique-acheter-viagra-super-active-100-mg-pas-cher#]Acheter Viagra Super Active 100 mg pas cher[/url] pharmacie de garde marseille en beauvaisis [url=https://kit.co/blufal/acheter-hydrea-500-mg-pas-cher-hydrea-pharmacie-luxembourg#]Hydrea livraison Luxembourg[/url] , traitement jambes sans repos pharmacie seraucourt bourges , traitement gastro. pharmacie genevois annecy pharmacie saint jacques auchan ronq [url=https://kit.co/greenal/ventolin-pharmacie-france-acheter-ventolin-100-mcg-pas-cher#]Ventolin Albuterol 100 mcg[/url] , pharmacie amiens rue jean moulin. pharmacie bourges tinteniac, pharmacie cap 3000 pharmacie la plus proche . pharmacie guetta argenteuil horaires, pharmacie a proximite ouvert pharmacie avignon intra muros pharmacie de beaulieu saint-etienne .
cheap basic health insurance mhw health regen augment where to get
ivermectin cream uk https://ivermectinhome.com
ventolin inhaler – buy ventolin buy Albuterol
withings blood pressure monitor va asthma disability rating
ivermectin tablets for humans for sale https://ivermectinhome.com
cytotec pills order – cytotec 200mg price buying cytotec online
doxycycline online india – doxycycline cost canada doxycycline uk
neurontin 300mg capsule – neurontin 900 levothyroxine 300 mcg tablets
punta gorda health department http://pharmvolk.com cheap over the counter medication
viagra for sale no prescription – sildenafil 40 mg
california health insurance http://dapoxetineus.com/ buy dapoxetine
cialis pills sale canada – price for cialis daily use tadalafil online 40mg
what does aids sores look like http://kamagrapolo.com kamagra oral gel
fda ivermectin – ivermectin 6mg tablet for lice ivermectin buy australia
what’s vd disease http://canadian2pharmacy.com online prescription drugs from canada
pharmacy accutane – 80 mg accutane daily accutane tablets buy online
que hacer cuando el viagra no trabaja https://viagrob.com lowest price viagra
amoxicillin 500mg capsules – buy amoxicillin 500 mg where to buy amoxicilin 500 mg
methylprednisolone 16 mg tab – lyrica 50 mg price lyrica tablets 300mg
eassy writing – term paper custom affordable term papers
order viagra online – Buy viagra internet best viagra pills uk
best online pharmacy no prescription – Cialis buy overnight canadian price for tadalafil
How can I authenticate apollo with Auth0 in VueJS – JavaScript Help buy prescription medications online http://canadianvolk.com drugs without an rx
prednisone 60 mg tablets – prednisone over the counter canada prednisone rx
buy lasix – lasix online lasix 80 mg daily
stromectol for sale http://ivermectino.com ivermectin 6 mg How can I authenticate apollo with Auth0 in VueJS – JavaScript Help
order Albuterol – ventolin cost ventolin generic brand
order cytotec online – cytotec tablets cytotec online india
doxycycline price in india – best price for doxycycline prednisolone pharmacy
ivermectin 400 mg brands – ivermectin 2mg online side effects of ivermectin
ivermectin 3mg for lice – stromectol generico stromectol nz
https://stromectolo.com – ivermectin for humans for sale
buy dexamethasone http://azithrozpack.com azithromycin pack
free sildenafil – sildenafil prices sildenafil buy
ivermectin 4 tablets price http://ivermectin1.com/ where to buy ivermectin
buy tadalafil online cheap – tadalafil citrate buy tadalafil pills
accutane prescription online – buy accutane from canada cheapest accutane generic
purchase essays online – wressays buying an essay
https://ivrmectin.com – ivermectin
generic levitra – walgreens pharmacy ed pills at cvs
cetirizine hcl 10mg tab – https://allergyd.com
malegra 200 – ceneforce fildena 120
where to buy ivermectin http://stromectolforte.com/# ivermectin for humans amazon ivermectin pill cost
xenical 120mg reviews – xenical generico orlistat medicamento
ivermectin over the counter uk – stromectol tablet oral stromectol cost
viagra online no prescription canada – viagra overnight generic viagra mexico pharmacy
buy cialis 40 mg – firstedci.com overseas pharmacy no prescription
tenet healthcare job opportunities http://doctorkiva.com – cvs viagra over the counter
buy stromectol ivermectine http://stromectolforte.com/# stromectol stromectol
online pharmacy cialis 20mg – cialis 40 mg europe prescription tadalafil online
buy prednisone online india – prednisone otc uk can i buy prednisone online in uk
ivermectin 2 – ivermectin pills human ivermectin 6 mg
ivermectin generic https://www.stromectoloff.com/ stromectol covid 19
ivermectin gel – ivermectin cost in usa ivermectin lotion cost
can melatonin cause high blood pressure http://cialis20walmart.com – viagra cialis cheap
viagra canadian pharmacy no prescription – buy viagra minnesota sildenafil uk otc
how long does it take levitra to work https://www.levitraoff.com levitra orodispersible india
cialis for sale without pre kiminvog viagra pills without prescription – ereccialtdfil.com price of cialis gener
sugarhouse casino online – pala casino online casino online usa
ivermectin side effects – ivermectin tablets ivermectin online
viagra from canadian pharmacy – canadian valley pharmacy canadian pharmacy 365
prednisone cost canada – predisone with no presciption prednisone 10mg prices
buy sildenafil online cheap http://www.viagwdp.com/# cost for viagra prescription viagra at walmart
can i buy prednisone online in uk – buying prednisone online how can i get prednisone
prednisone generic brand – buy prednisone online cheap deltasone pill
purchase accutane with paypal – accutane pills accutane generic cost
https://lasixotc.com shock wave therapy devices for erectile dysfunction sources for sale reviews
casino slot – site wind creek casino online play
accutane cost in south africa – accutane pills buy online accutane 40 mg daily
where to buy otc ed pills – buy ed pills best price medicine for erectile
generic sildalis – order generic diflucan buy metformin 500mg online
acillin sale – order ciprofloxacin 1000mg generic order hydroxychloroquine pill
plaquenil 400mg price – hydroxychloroquine 200mg cost plaquenil buy online
purchase sildenafil pill – viagra 100mg cost order tadalafil online cheap
viagra generique en pharmacie – sildenafil 100mg ohne rezept tadalafil 5mg sans ordonnance en pharmacie
ivermectin 3mg tablets – oral stromectol 6mg stromectol tablets for humans
order prednisone 10mg – purchase prednisone pill order prednisone 5mg pills
isotretinoin 10mg for sale – order isotretinoin 20mg pills amoxicillin 1000mg for sale
pregabalin online – buy zyrtec 10mg online cheap order zithromax pills
order tizanidine 2mg online – toradol order buy gloperba without prescription
where to order tadalafil tablets tadalafil price walmart
inderal for sale – order generic strattera 10mg plaquenil 200mg canada
https://cialisicp.com/ buy tadalis
side effects for tadalafil where to get tadalafil
tadalafil brands tadalafil brands
cost of cialis cialis without prescription
tadalafil brands tadalafil side effects
generic name for ivermectin ivermectin brand