Great! Now that we have AuthProvider added to the project, we can build and run our app to confirm we have imported it correctly. Now, let's go ahead and define our User model next:
- Create a new file called User.swift inside the Models folder in your Vapor app and make sure that you check App under Targets:
- Inside this file, delete all of the sample code and import the following dependencies:
import FluentProviderimport HTTPimport Fluentimport AuthProvider
- Next, define the class, and we will make it implement both the Model and SessionPersistable protocols:
final class User: Model, SessionPersistable ...