Giter VIP home page Giter VIP logo

selfauth's Introduction

Selfauth

Selfauth is a self-hosted Authorization Endpoint used to login with a personal URL (as Web sign-in) via IndieAuth. See How it works for more.

Selfauth is not a Token Endpoint. To fully use Selfauth for authorization (and not just authentication) a separate token endpoint needs to be set-up, e.g. when using Micropub clients. Examples of Token Endpoints are listed on the wiki.

Warnings

  • While Selfauth will work with old versions of PHP, some of the more secure functions Selfauth uses were not added until version 5.6. While older versions are not completely insecure, it is strongly recommended you upgrade to a newer version of PHP.

Setup

To set up Selfauth, create a folder on your webserver and add the files in this repository to it. You can name the folder anything you like, but in this example we will work with 'auth' under https://example.com/auth/.

  1. Create a folder called 'auth' on your webserver and add at least index.php and setup.php.

  2. Go to https://example.com/auth/setup.php and fill in the form: pick the personal URL you're trying to log in for (in our case https://example.com) and choose a password.

  3. Find the index-page of your domain and add the following code inside the <head> tag:

    <link rel="authorization_endpoint" href="https://example.com/auth/" />

    ... where https://example.com/auth/ is the URL you installed Selfauth to. (The exact location of your HTML <head> could be hidden in your CMS. Look for help in their documentation. Setting a HTTP Link header like Link: <https://example.com/auth/>; rel="authorization_endpoint" should work too.)

You can delete the file setup.php if you want, but this is optional. It will not be able to save a new password for you once the setup is completed.

Changing your password

To change your password, make sure the setup.php file is in place again and delete config.php. Then follow the steps under Setup again.

How it works

On a (Web)App which supports IndieAuth, you can enter your personal URL. The App will detect Selfauth as Authorization Endpoint and redirect you to it. After you enter your password in Selfauth, you are redirected back to the App with a code. The App will verify the code with Selfauth and logs you in as your personal URL.

To test it, you can go to an App that supports IndieAuth and enter your personal URL. IndieAuth.com has a test-form on the frontpage. If you also link to your social media accounts using rel="me", IndieAuth.com might show you a list of buttons. To use Selfauth, click the one that has your Selfauth URL on it.

License

Copyright 2017 by Ben Roberts and contributors

Available under the Creative Commons CC0 1.0 Universal and MIT licenses.

See CC0-LICENSE.md and MIT-LICENSE.md for the text of these licenses.

selfauth's People

Contributors

zegnat avatar sebsel avatar aaronpk avatar sugardave avatar ancarda avatar sknebel 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.