# Authentication and access management with OAuth

An Ampersand application may grant access to named users. We have done this before using the [open standard OAuth ](https://oauth.net)(Open Authorization). This allows access to specific private data on a different website, without requiring the user to hand over their credentials (e.g. username/password).

## Setting up with Github as access provider

I made a separate Github organization, RAP-OUNL, to serve as access provider for RAP4.

callback URL: [http://example.com/AmpersandPrototypes/RAP4/api/v1/oauthlogin/callback/github](http://example.com/AmpersandPrototypes/RAP3/api/v1/oauthlogin/callback/github)

## Experimenting from a laptop

For experimentation purposes, I added the following line to `C:\Windows\System32\drivers\etc` on my Windows 7 laptop.

```
127.0.0.1 example.com
```

Then I flushed the local name server in a command line window.

```
C:\> ipconfig /flushdns
```

Then I brought up a browser window, to see that `example.com` is a valid URL. Now I can experiment with OUauth from the laptop, because the OAuth server can return messages to `example.com`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ampersandtarski.gitbook.io/the-tools-we-use-for-ampersand/authentication-and-access-management-with-oauth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
