Code Monkey home page Code Monkey logo

auth-template's Introduction

Vapor

Documentation Team Chat MIT License Continuous Integration Code Coverage Swift 5.7+ Mastodon


Vapor is an HTTP web framework for Swift. It provides a beautifully expressive and easy-to-use foundation for your next website, API, or cloud project.

Take a look at some of the awesome stuff created with Vapor.

💧 Community

Join the welcoming community of fellow Vapor developers on Discord.

🚀 Contributing

To contribute a feature or idea to Vapor, create an issue explaining your idea or bring it up on Discord.

If you find a bug, please create an issue.

If you find a security vulnerability, please contact [email protected] as soon as possible.

💛 Sponsors

Support Vapor's development by becoming a sponsor.

Broken Hands Emerge Tools Jari Donut Dane MacStadium

💚 Backers

Support Vapor's development by becoming a backer.

Moritz LangMaarten EngelsThomas KrajacicJesse TiptonSteve HumeMikkel UlstrupGeoffrey FosterPaul SchmiedmayerScott RobbinsSven A. SchmidtSpencer CurtisZach RausnitzTim „Timinator“ KretzschmarKlaasAndrew Edwards+Li, Inc.Stijn WillemsKyle NewsomeVia Aurelia SolutionsJakub KiermaszBrian DrellingMattes MohrJamieGalen RhodesLitmapsDavid RomanBrian StrobachKishikawa KatsumiAlex SherbakovSidetrackGreg KarpatiFrantišek MikšJeremy GreenwoodRay FixMićo MiloložaAlanJonas SannewaldTapEnvy.us, LLCJawadPARAIPAN SORINKalyn DavisYR ChenAarón Martínez Cuevas

auth-template's People

Contributors

0xtim avatar joscdk avatar mrlotu avatar tanner0101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auth-template's Issues

Bad Practice for hashing passwords

In the Auth Template example it uses the drop.hash to create a hashed password, which is configured to use a SHA256 hasher. This is not secure! To make it explicit, the passwordVerifier on the User should use a BCryptHasher to show best practises.

Postman returns invalidCredentials when posting to Login method

When using Postman to test this REST API, I keep getting 'invalidCredentials' error when calling the 'Login' method (with Basic Auth header key). For some reason the verify() in Hash extension of BCrypt 1.1.0 dependency fails but I don't know why (I use PostgreSQL to save the User & Token data).

Anyone any idea how to fix this ?

thanks in advance
Frank

Request to add client tests on routes

Please add tests in auth-template/Tests/AppTests/AppTests.swift.

I'm having difficulty sending simple HTTP POST and GET requests as a Vapor client from within AppTests.swift and would really benefit from seeing it exemplified here. For instance, I cannot call Droplet() even after I import Vapor.

So far, I'm trying to do some basic BDD (Node.js + Express with mocha/chai/jasmine inspired-style):

import Quick
import Nimble
import Vapor

@testable import App

class RoutesSpec: QuickSpec {
    
    let testUrl = "http://localhost:8080"
    
    override func spec() {
        describe("User can create account") {
            it("should respond with error JSON when an incorrect body is sent") {
                
                // @todo use Vapor to make simple HTTP POST here
                
                do {
                    // @todo .....
                    // (I've tried looking in the Vapor documentation... 
                    // I'm still unsure how to make simple HTTP requests...
                    // Request for example here...) ??
                } catch {
                    print("Error")
                }
                
                expect(false).toEventually(beTrue())
            }
            
            it("should respond respond with a user JSON when a correct body is sent") {
                // (@todo ....)                
                expect(false).toEventually(beTrue())
            }
            
        }
        
        
    }
}

Installation failed

Hello,

I just tried to start a new project with the auth api template. When i want to start, building Docker image or create a Xcode project file, i have this error :

Fetching https://github.com/vapor/vapor.git
Fetching https://github.com/vapor/fluent-sqlite.git
Fetching https://github.com/vapor/console.git
Fetching https://github.com/vapor/core.git
Fetching https://github.com/vapor/crypto.git
Fetching https://github.com/vapor/database-kit.git
Fetching https://github.com/vapor/http.git
Fetching https://github.com/vapor/multipart.git
Fetching https://github.com/vapor/routing.git
Fetching https://github.com/vapor/service.git
Fetching https://github.com/vapor/template-kit.git
Fetching https://github.com/vapor/url-encoded-form.git
Fetching https://github.com/vapor/validation.git
Fetching https://github.com/vapor/websocket.git
error: failed to clone; Clonage dans le dépôt nu '/Users/xxx/Documents/auth/.build/repositories/database-kit.git-1600799374221354102'
/Users/xxx/Documents/auth/.build/repositories/database-kit.git-1600799374221354102: Permission denied
error: cyclic dependency declaration found: auth -> auth
'auth' /Users/xxx/Documents/auth: error: product dependency 'Authentication' not found
'auth' /Users/xxx/Documents/auth: error: product dependency 'FluentSQLite' not found
'auth' /Users/xxx/Documents/auth: error: product dependency 'Vapor' not found
Segmentation fault: 11

I guess a dependancy is corrumped and can break the installation. or something else ?

Regards,

Tchoupinax. :)

Vapor 4

Hi
This template is not updated to work in Vapor 4

thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.