惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
腾讯CDC
J
Java Code Geeks
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
雷峰网
雷峰网
B
Blog RSS Feed
博客园_首页
量子位
F
Fortinet All Blogs
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog

Railway Blog

Where Railway is, and where it's going (Summer 2026) PaaS vs IaaS vs SaaS: What Each Means and Who Should Pick What in 2026 The Best Continuous Deployment Tools in 2026 The Best PaaS for Multi-Region Deployments in 2026 The Best Platforms for Monorepo Deployments in 2026 Compliance Isn't a Feature, It's a Posture What is BYOC (Bring Your Own Cloud)? A Developer's Guide for 2026 The Best Managed Kubernetes Hosting in 2026 The Best Container Registries in 2026 The Vanilla Cloud Tax: What Rolling Your Own on AWS Actually Costs What is a PaaS? A Developer's Guide for 2026 The Best Cloud Observability and Logging Tools in 2026 The Best PostgreSQL Hosting for Developers in 2026 The Best Multi-Region Hosting Platforms in 2026 The Best Platforms to Deploy AI Apps in 2026 (Not the Models, the Apps Around Them) Incident Report: May 19, 2026- GCP Account Suspension Counting to 3 with a new builder processing 50M+ monthly builds Railway iOS preview now available via TestFlight Kill your onboarding: selling to 10,000+ new users a day Your AI wants to nuke your database. Guardrails fix that. Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI Moving Railway's Frontend Off Next.js One command deploys, there's a Stripe APP for that From registrar to deployed: buying a domain inside Railway A letter to open source builders who deserve more Networking is a black box, we used eBPF to open it Heroku Walked So Railway Can Run Security Features Your Security Team Will Love Railway Runs Open Source, Now We're Funding It Railway raises $100M Series B to unburden the builders
Deploy Authorizer on Railway
Faraz Patankar · 2022-01-28 · via Railway Blog

Authorizer is an open-source authentication and authorization solution that comes with easy to integrate frontend SDKs while also allowing you to bring your own database. You can think of it as a self-hosted alternative to Auth0.

Authorizer provides an onboarding experience that takes just 3 minutes so that you can spend all your valuable time staying focused on your product and not losing sleep worrying about security, authentication and authorization.

At Railway, we provide a free one-click deploy for Authorizer that is maintained by Lakhan Samani (the creator of Authorizer) himself. We also automatically provision the required PostgreSQL and Redis databases for you!

How it works

A brief overview of how Authorizer works
A brief overview of how Authorizer works

Once you set up your Authorizer instance using this guide, you get the following features straight out of the box:

  • Email and password based accounts
  • Password-less accounts with magic links
  • Social logins with Google, Github, Facebook
  • Secure session management
  • Email verification
  • APIs to update profile securely
  • Forgot password flow using email
  • Role-based access management
  • Built-in login page
  • Integrations for React, JavaScript with support for more languages and frameworks coming soon

Deploying on Railway

To deploy Authorizer on Railway, you can simply click this button and follow the guide below. You can also visit Github to view the source code.

After you click the button, you will see the following screen:

Authorizer template page on Railway
Authorizer template page on Railway

Allow GitHub access

To deploy your Authorizer instance, Railway needs to create a repo in your GitHub account which it will deploy for you. So if you haven’t already, give Railway access to your GitHub on this page.

Choose a repository title

By default, the repository created for you will be titled authorizer-railway but feel free to choose a different name. Just make sure another repository with that name doesn’t already exist.

Configure the required environment variables

  • The DATABASE_URL will be automatically configured for you by Railway when we provision the required PostgreSQL database for you.
  • The REDIS_URL will also automatically configured for you by Railway when we provision the required Redis database for you.
  • Some other required variables will already be prefilled but make sure you configure the ADMIN_SECRET and the JWT_SECRET.
  • Additionally, if you’d like to use social logins, you’d have to configure the client ID and client secret for those platforms.

💬 Psst, we have a secret generator that you can use. Just hit CMD+K (or CTRL+K) and search for secret.

Deploy

Once you’ve filled in all the required environment variables, just hit the deploy button on the page and you’ll be taken to your brand new project and your Authorizer instance will be deployed in a few minutes!

Optionally, if you’re using a React frontend, carry on reading for a guide on integrating Authorizer in your React application.

Integrating Authorizer with your React application

Installing the Authorizer package

If you use NPM:

npm i --save @authorizerdev/authorizer-react

Or, if you use yarn, you can run:

yarn add @authorizerdev/authorizer-react

Configuring the Authorizer provider

Make sure you replace the text RAILWAY_ENDPOINT with the actual endpoint that Railway gives you once your application is deployed.

import {
  AuthorizerProvider,
} from "@authorizerdev/authorizer-react";

const App = () => {
  return (
    <AuthorizerProvider
      config={{
        authorizerURL: RAILWAY_ENDPOINT,
        redirectURL: window.location.origin,
      }}
    >
      <LoginSignup />
      <Profile />
    </AuthorizerProvider>
  );
};

Using the Authorizer component

Authorizer provides a core component that can be used for your login, sign up, and forgot password flows with support for social logins.

import { Authorizer } from "@authorizerdev/authorizer-react";

const LoginPage = () => {
  return (
    <>
      <h1>Login / Signup</h1>
      <Authorizer
        onLogin={(loginResponse) => {}}
        onMagicLinkLogin={(magicLinkResponse) => {}}
        onSignup={(signupResponse) => {}}
        onForgotPassword={(forgotPasswordResponse = {})}
      />
    </>
  );
};

Using the Authorizer hook

The Authorizer hook gives you access to the global state stored inside the Authorizer context with additional methods to update the state.

const Profile = () => {
  const { user } = useAuthorizer();

  if (user) {
    return <div>{user.email}</div>;
  }

  return null;
};

Further reading

Closing

And with that, you should have all the information you need to deploy your own Authorizer instance on Railway. You should be able to create new projects and add the Authorizer widget to your websites.

If you have any suggestions for more open-source self-hosted solutions you'd like to see guides for, let us know on Discord. Or even better, submit a pull request to our starters repository on Github!