vapor-community / Imperial

Federated Authentication with OAuth providers
MIT License
155 stars 48 forks source link

Cleanup session code, docs fixes for Shopify #25

Closed davidmuzi closed 5 years ago

davidmuzi commented 5 years ago
calebkleveter commented 5 years ago

@davidmuzi Are you ready for this to be merged, or do you want to make more changes first?

davidmuzi commented 5 years ago

Good to merge!

I was running through starting a new app from scratch and was running into this fatal error:

public var container: Container {
        guard let c = _container else {
            fatalError("If you encounter this error, you are holding on to a client after de-initializing your Application. This is usually a bad idea.")
        }
        return c
    }

It looks like there where 2 request objects in public func fetchToken(from request: Request) throws -> EventLoopFuture<String> that where in scope, and the wrong one was being used. Oddly, the app I created along side the work I was doing in Imperial works fine 🤷‍♂️ Either way, it obviously makes sense that I renamed the variables to not cause this confusion.