{"id":24298203,"url":"https://github.com/nealarch01/iosgouserauth","last_synced_at":"2026-04-10T02:10:57.354Z","repository":{"id":127488656,"uuid":"581701135","full_name":"nealarch01/iOSGoUserAuth","owner":"nealarch01","description":"🔓 Full stack user authentication for an iOS application with a Go REST API","archived":false,"fork":false,"pushed_at":"2023-01-19T10:29:15.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-16T20:57:58.742Z","etag":null,"topics":["full-stack","go","golang","ios","jwt","mvc","mvvm","postgresql","rest","rest-api","swift","swiftui","user-authentication"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nealarch01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-24T02:07:48.000Z","updated_at":"2023-02-20T23:30:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"653b906e-d884-466e-9bbe-f4d9d17c27ef","html_url":"https://github.com/nealarch01/iOSGoUserAuth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nealarch01%2FiOSGoUserAuth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nealarch01%2FiOSGoUserAuth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nealarch01%2FiOSGoUserAuth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nealarch01%2FiOSGoUserAuth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nealarch01","download_url":"https://codeload.github.com/nealarch01/iOSGoUserAuth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242186955,"owners_count":20086212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["full-stack","go","golang","ios","jwt","mvc","mvvm","postgresql","rest","rest-api","swift","swiftui","user-authentication"],"created_at":"2025-01-16T20:54:13.056Z","updated_at":"2025-12-31T00:51:32.025Z","avatar_url":"https://github.com/nealarch01.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS Go User Authentication\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/postgresql/postgresql-original.svg\" height=\"150\" align=\"right\" /\u003e\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/go/go-original.svg\" height=\"150\" align=\"right\" /\u003e\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/swift/swift-original.svg\" height=\"150\" align=\"right\" /\u003e\n\n          \n\nUser authentication full stack application created in Swift and Go (Golang) using JSON Web Tokens (JWTs)\n\n## Table of Contents:\n- [Video](#video)\n- [Technology Stack](#tech-stack)\n- [Installation/Configuration](#installationconfigration)\n  - [Database](#setting-up-the-database)\n  - [REST API](#rest-api-setup--configuration)\n  - [iOS App](#ios-app-setup)\n- [REST API Documentation](#rest-api-documentation)\n- [Features](#features-🔥)\n- [Missing Features](#missing-features-🫠)\n\n## Video\nhttps://user-images.githubusercontent.com/73256760/209417784-0bb07f94-495a-4c5e-be82-87fd9233bba8.mov\n\n\n\n## Tech Stack\n### Frontend (iOS Application)\n- **Language:** Swift\n- **Frameworks**: SwiftUI\n- **Architecture:** Model-View-ViewModel (MVVM)\n\n### Backend (REST API)\n- **Language:** Go (Golang)\n- **Frameworks/Libraries:** Gorilla/MUX, JSON Web Tokens (JWTs), database/sql\n- **Architecture:** Model-View-Controller (MVC)\n\n### Database\n- PostgreSQL\n\n## Installation/Configration:\nMake sure you have all dependencies: XCode, Go, PostgreSQL (Preferrably version 15+)\n\n### Database Setup:\n- Create a PostgreSQL instance using Postgres.app\n- An SQL Script was provided that inserts two essential tables: `account` and `token_blacklist`\n  - To run this script, navigate into the `./database-setup` directory and use `psql -p {port_number} -f tables.sql`\n    - Example: `psql -p 5432 -f tables.sql`\n\n### REST API Setup \u0026 Configuration\nAfter completing database set up and configuration: running `tables.sql` and activating the server instance. You will need to modify  `./auth-server/api/database/connection.go`\n- In this file is a connection string. You will most likely have to change this if your PostgreSQL instance have a different name, host, password, etc\n\n- After completing the steps above, you can run main.go, example: `go run main.go`. Or, build it into an executable and then run it, example: `go build main.go \u0026\u0026 ./main`\n\n### iOS App Setup:\n- Simply open the top-level iOSApp folder in XCode\n\n## REST API Documentation:\n- [Postman Documentation](https://documenter.getpostman.com/view/21072555/2s8Z6vYEMF)\n\n\n## Directory Structure\n```\n.\n├── auth-server\n│   └── api\n│       ├── auth\n│       ├── controllers\n│       ├── database\n│       ├── middlewares\n│       ├── models\n│       ├── routes\n│       └── utils\n├── database-setup\n└── iOSApp\n    ├── iOSApp\n    │   ├── Assets.xcassets\n    │   │   ├── AccentColor.colorset\n    │   │   └── AppIcon.appiconset\n    │   ├── Components\n    │   ├── Extensions\n    │   ├── Models\n    │   ├── Preview Content\n    │   │   └── Preview Assets.xcassets\n    │   ├── Services\n    │   ├── ViewModels\n    │   └── Views\n    └── iOSApp.xcodeproj\n        ├── project.xcworkspace\n            └── xcshareddata\n                └── swiftpm\n                    └── configuration\n```\n\n## Features 🔥\n- Login / Register \n- Authorization middleware for secured endpoints\n- JWT validation\n- Username, email, and password sanitzation and validation using regular expressions\n- Token blacklisting after logout\n- Clean and responsive user interface\n- iOS app error propagation for 400/500 status codes\n\n## Missing features 🫠:\n- No JWT refresh endpoints\n- PUT method to update account data was not implemented\n- Storing token for persistent login w/ CoreData/UserDefaults\n- HTTPs server (HTTP was chosen for development purposes)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnealarch01%2Fiosgouserauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnealarch01%2Fiosgouserauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnealarch01%2Fiosgouserauth/lists"}