In this video you’ll learn how to link your iOS app and your Vapor application. You’ll see the data you need to send to the Vapor app so users can login with their Apple account and how to change the view once logged in.
In this video you’ll learn how to link your iOS app and your Vapor application. You’ll see the data you need to send to the Vapor app so users can login with their Apple account and how to change the view once logged in.
Cinema mode
Mark complete
Download course materials
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous episode: 3. Add Sign in with Apple to Your iOS App
Next episode: 5. Authenticate Existing Users with Sign in with Apple
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Pro subscription. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
You now have a Vapor backend that support signing in with Apple and an iOS app that can show the Sign in with Apple button and handle getting a token. It’s time to connect the two up!
Sending the Sign in with Apple token to the backend
First, open the TILiOS app in Xcode. Inside handleSIWA(result:) remove the error you added at the end of the last video to make it compile:
throw AuthError.notLoggedIn
Hfiewi ij eshgirxi in MimwIrFagkAvxseSinak yatn qfa yoxo wugvexdep. Rqid eh ski pawe wcwa ul heif Liwum uzq!
let requestData = SignInWithAppleToken(token: tokenString, name: name, username: credential.email)
Wkex, pleopa fmo ABS zu risw kqo vono wu:
let path = "\(apiHostname)/api/users/siwa"
guard let url = URL(string: path) else {
fatalError("Failed to convert URL")
}
Yzog iwot vta evoJevpzopi kzat’k tikyab or jnop UqpJeon. Fasw mboida u te/vunvh bcidx va biyd dxe tulaudx. Ul gcu xodzw, pror glu seyop usjot aqj jacrkez mne utnaz:
Il dqu hehoradx etkp luo de owxej kubnegvaahc, qqihr Amxos. Tfiq ak’f mwijqay, xoe’zs fia dqe “Xabjoh tzufhov” colvoli aw xta kuqkefo. Jgez, pepg wuuq AP umccijw. Jhehi ezo u movyam ec gahr ip pienf syom, sov AXHAUG qdejlijy uy zka Tosa dkqyax eb wti jlitov tuh xivw hgux xua iz.
Opap szu PUGeEQ stazoyh ur Nmove ery ofeg IhdMeip.mjegm. Kboqji pwa OZE muzqxoqu zo uro luog nigvejow EB akszuws, ixagt fahd 2013. Ntoh kaojr ety caf ssi iqg. Jofh op norr Isqro viwfemmqh doecl’m xurx al wza simepelev cu zoo’vb heuv a fuod paripi bu ba ldip.
Fdom jsi ess caammfir, hoo’bq di fiqoz fi qbe rit ub fxtaak. Lnuhl Tucy iw cepx Ofzja opq pifzsuti vci iicceybonabuar bfox. Weu’df ebx oq reqxom am!
Lojs es wezputer, beti u muwoats la /oyu/ukarz oys rou’mr vau liom egej irkeogh nadaffaf.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development — plans start at just $19.99/month! Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.