ExecutableTestCode.swift is having code to test, have to add Firebase Project Id and Token to test.
TO DO:
.Package(url: "https://github.com/Aman-US-Punjabi/FireBase-Auth-AmanGarry.git", Version(0,2,2))
Congifure the provider in your Config+Setup.swift file : /// Configure providers private func setupProviders() throws { try addProvider(FirebaseAuthAmanGarry.Provider.self) }
Add the middleware to your routes
//------------------- API ---------------------- let api = grouped("api")
//------------------- API-V1 ------------------- let v1 = api.grouped("v1")
let demo = FirebaseAuthMiddleware(with: self.firebaseProjectId!)
let secureDemo = v1.grouped(demo)
secureDemo.get("hello") { req in var json = JSON() try json.set("hello", "world") return json }