Review what you have learned in both this section of videos and throughout this complete video course.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4493-server-side-swift-with-vapor/lessons/30
Review what you have learned in both this section of videos and throughout this complete video course.
Hi Tim, are there any plans to show integration with iOS apps, i.e. like the Kitura examples? I tried a few of those and they are in need of updates, I am now bouncing back to Vapor. Slightly frustrating at the moment.
I am going to renew my sub here so I can work on the current Vapor vids.
Thx for any feedback!
@anm8tr there will be a chapter on it in the book. But your iOS app can work just the same as Rested has throughout the videos
Hi Tim, just wanted to send a huge thank-you to you and the team for these videos. I don’t think I’ve ever waited with such anticipation for the next video in a series to go live as I did with these. I’m super excited for the book release. I’ve already got my boss excited about the project I’m building with Vapor and I’m amped to get into some of the more detailed aspects.
Is there already a release date for the book?
@danielmueller ‘Spring 2018’ - so no hard release date yet. The early access chapters should be released in the next couple of weeks or so hopefully. Depends on how many breaking changes NIO introduces!
Any idea why the login doesn’t stick? I don’t have block cookies on, so I’m not sure why I can log in and create an acronym, but after a few page clicks to edit, etc, it suddenly starts asking for a password again.
@jtrimble hmm so you’re saying it works for a bit then all of a sudden it’s like you’ve been logged out? I’m currently looking at an issue where on Vapor Cloud login isn’t persisted at all, I wonder if it’s related
Exactly. I can log in and then create an acronym, go to home, click an acronym, edit it, home, click, delete and randomly somewhere in there I’ll get prompted for authentication again. Both in Chrome and in Safari.
@jtrimble Hmm ok let me investigate!
@jtrimble I’m not able to reproduce that! Is this within a minute or two? Is there anything in the console?
I just reproduced it in Safari. Tried to edit an existing acronym, got the login prompt. Logged in. Created new acronym. Clicked on edit, prompted for login again.
Nothing is showing up in the console.
Could I have missed something in the code that would cause this, or if I missed it would it work at all?
@jtrimble I would have thought that if there were something missing then it wouldn’t work at all, but I’ve just downloaded the code from the Video 29 materials and have spent a good couple of minutes clicking around, creating, editing and deleting acronyms and haven’t had any issues. So maybe try from that and see if it works?
Just downloaded the code and reproduced it in Safari. I’m not sure what configuration I need that might be affecting this…
@0xtim Do you have any feedback regarding this? Thank you - much appreciated! :]
@jtrimble ok next trick is to clean everything - make sure you only have the one project (I have about 20 TIL apps open half the time), then in the project directory run rm -rf .build/ Package.resolved *.xcodeproj
and also wipe your Derived Data and try again
I got the same problem like jtrimble. I logged the authentication status with let loggedIn = try req.isAuthenticated(User.self)
but it disappears sometimes directly or after like 5-10 seconds. Clearing everything didn’t work for me unfortunately. Example Session is also working for me, what could it be @0xtim any ideas?
@lain do you mean the example session is not working for you? Can you make sure you are on the latest version of the beta as well by running vapor update
No no I meant I downloaded the example project and it’s working fine even after some restarts. I checked my code multiple times but I can’t figure out where the problem is. Standard Safari seemed to keep the session more reliable. I ran vapor update but seems to have no effect. Do you know any way to dig in or log what’s happening to the session / cookie?
I also saw your Issue on Vapor Auth on github Auth 2 - Cookies not working in Safari Tech Preview · Issue #28 · vapor/auth · GitHub keep up the good work !
@lain hmm! Can you diff the code? Make sure you have the latest betas to start with by running vapor update
. The issue I raised only happens on Safari Tech Preview and never logs you in - I’m yet to investigate this, but if you stay logged in for a bit it sounds like a different issue