Giter Club home page Giter Club logo

simpleloginregisterproject's Introduction

SimpleLoginRegisterProject

Warnings:

This project doesn't use any CSS.

This project isn't by any means secure.

Project goals:

  • Build ASP.NET Core API from "empty" project ASP.NET Core
  • Use SQL Server database with Entity Framework Core (Code first)
  • Get database connection string from appsettings file
  • Create API controller with login and register features
  • Passwords should be at least hashed on backend
  • Controller shouldn't have any access to database
  • All interactions with database should be handled by service layer
  • Services should be injected using Microsoft.Extension.DependencyInjection
  • API calls should be authorized by global API key
  • API calls should be made by external React.JS app using axios
  • API should be tested in Postman Chrome extension

Encountered problems and solutions:

  • All API calls resulted with 404 - Registered controllers
  • API calls from external apps was blocked - Configured CORS policy
  • All API calls from React app refreshed it - Added prevention of default button onClick event
  • Checkbox onChange.target.value was always on, therefore Register component state.permissions was always 0 - Added additional variable to store next state.permissions value

What have I learned during work on this project:

  • What is CORS policy
  • Fact that you need to register controllers somewhere
  • Basic understanding how to use API authorization based on API key

simpleloginregisterproject's People

Contributors

jerzykruszewski avatar

Watchers

James Cloos avatar  avatar

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.