You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-37Lines changed: 45 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,43 +59,50 @@
59
59
60
60
# Getting Started
61
61
62
-
## Trying out Authorizer
62
+
## Step 1: Get Authorizer Instance
63
63
64
-
This guide helps you practice using Authorizer to evaluate it before you use it in a production environment. It includes instructions for installing the Authorizer server in local or standalone mode.
64
+
### Deploy Production Ready Instance
65
+
66
+
Deploy production ready Authorizer instance using one click deployment options available below
| Railway.app | <ahref="https://railway.app/new/template?template=https://github.com/authorizerdev/authorizer-railway&plugins=postgresql,redis"><imgsrc="https://railway.app/button.svg"style="height: 44px"alt="Deploy on Railway"></a> |[docs](https://docs.authorizer.dev/deployment/railway)|
71
+
| Heroku | <ahref="https://heroku.com/deploy?template=https://github.com/authorizerdev/authorizer-heroku"><imgsrc="https://www.herokucdn.com/deploy/button.svg"alt="Deploy to Heroku"style="height: 44px;"></a> |[docs](https://docs.authorizer.dev/deployment/heroku)|
72
+
| Render |[](https://render.com/deploy?repo=https://github.com/authorizerdev/authorizer-render)|[docs](https://docs.authorizer.dev/deployment/render)|
73
+
74
+
### Deploy Authorizer Using Source Code
65
75
66
-
-[Install using source code](#install-using-source-code)
67
-
-[Install using binaries](#install-using-binaries)
68
-
-[Install instance on heroku](#install-instance-on-Heroku)
69
-
-[Install instance on railway.app](#install-instance-on-railway)
76
+
This guide helps you practice using Authorizer to evaluate it before you use it in a production environment. It includes instructions for installing the Authorizer server in local or standalone mode.
70
77
71
-
## Install using source code
78
+
####Install using source code
72
79
73
-
### Prerequisites
80
+
####Prerequisites
74
81
75
82
- OS: Linux or macOS or windows
76
83
- Go: (Golang)(https://golang.org/dl/) >= v1.15
77
84
78
-
### Project Setup
85
+
####Project Setup
79
86
80
87
1. Fork the [authorizer](https://github.com/authorizerdev/authorizer) repository (**Skip this step if you have access to repo**)
81
88
2. Clone repo: `git clone https://github.com/authorizerdev/authorizer.git` or use the forked url from step 1
82
89
3. Change directory to authorizer: `cd authorizer`
83
-
5. Create Env file `cp .env.sample .env`. Check all the supported env [here](https://docs.authorizer.dev/core/env/)
84
-
6. Build Dashboard `make build-dashboard`
85
-
7. Build App `make build-app`
86
-
8. Build Server `make clean && make`
90
+
4. Create Env file `cp .env.sample .env`. Check all the supported env [here](https://docs.authorizer.dev/core/env/)
91
+
5. Build Dashboard `make build-dashboard`
92
+
6. Build App `make build-app`
93
+
7. Build Server `make clean && make`
87
94
> Note: if you don't have [`make`](https://www.ibm.com/docs/en/aix/7.2?topic=concepts-make-command), you can `cd` into `server` dir and build using the `go build` command
88
-
9. Run binary `./build/server`
95
+
8. Run binary `./build/server`
89
96
90
-
##Install using binaries
97
+
### Deploy Authorizer using binaries
91
98
92
99
Deploy / Try Authorizer using binaries. With each [Authorizer Release](https://github.com/authorizerdev/authorizer/releases)
93
100
binaries are baked with required deployment files and bundled. You can download a specific version of it for the following operating systems:
94
101
95
102
- Mac OSX
96
103
- Linux
97
104
98
-
###Step 1: Download and unzip bundle
105
+
####Download and unzip bundle
99
106
100
107
- Download the Bundle for the specific OS from the [release page](https://github.com/authorizerdev/authorizer/releases)
101
108
@@ -115,11 +122,7 @@ binaries are baked with required deployment files and bundled. You can download
115
122
cd authorizer
116
123
```
117
124
118
-
### Step 2: Configure environment variables
119
-
120
-
Required environment variables are pre-configured in `.env` file. But based on the production requirements, please configure more environment variables. You can refer to [environment variables docs](/core/env) for more information.
121
-
122
-
### Step 3: Start Authorizer
125
+
#### Step 3: Start Authorizer
123
126
124
127
- Run following command to start authorizer
125
128
@@ -131,20 +134,20 @@ Required environment variables are pre-configured in `.env` file. But based on t
131
134
132
135
> Note: For mac users, you might have to give binary the permission to execute. Here is the command you can use to grant permission `xattr -d com.apple.quarantine build/server`
133
136
134
-
Deploy production ready Authorizer instance using one click deployment options available below
| Railway.app | <ahref="https://railway.app/new/template?template=https://github.com/authorizerdev/authorizer-railway&plugins=postgresql,redis"><imgsrc="https://railway.app/button.svg"style="height: 44px"alt="Deploy on Railway"></a> |[docs](https://docs.authorizer.dev/deployment/railway)|
139
-
| Heroku | <ahref="https://heroku.com/deploy?template=https://github.com/authorizerdev/authorizer-heroku"><imgsrc="https://www.herokucdn.com/deploy/button.svg"alt="Deploy to Heroku"style="height: 44px;"></a> |[docs](https://docs.authorizer.dev/deployment/heroku)|
140
-
| Render |[](https://render.com/deploy?repo=https://github.com/authorizerdev/authorizer-render)|[docs](https://docs.authorizer.dev/deployment/render)|
139
+
- Open authorizer instance endpoint in browser
140
+
- Sign up as an admin with a secure password
141
+
- Configure environment variables from authorizer dashboard. Check env [docs](/core/env) for more information
142
+
143
+
> Note: `DATABASE_URL`, `DATABASE_TYPE` and `DATABASE_NAME` are only configurable via platform envs
141
144
142
145
### Things to consider
143
146
144
147
- For social logins, you will need respective social platform key and secret
145
148
- For having verified users, you will need an SMTP server with an email address and password using which system can send emails. The system will send a verification link to an email address. Once an email is verified then, only able to access it.
146
149
> Note: One can always disable the email verification to allow open sign up, which is not recommended for production as anyone can use anyone's email address 😅
147
-
- For persisting user sessions, you will need Redis URL (not in case of railway.app). If you do not configure a Redis server, sessions will be persisted until the instance is up or not restarted. For better response time on authorization requests/middleware, we recommend deploying Redis on the same infra/network as your authorizer server.
150
+
- For persisting user sessions, you will need Redis URL (not in case of railwayapp). If you do not configure a Redis server, sessions will be persisted until the instance is up or not restarted. For better response time on authorization requests/middleware, we recommend deploying Redis on the same infra/network as your authorizer server.
148
151
149
152
## Testing
150
153
@@ -163,8 +166,9 @@ This example demonstrates how you can use [`@authorizerdev/authorizer-js`](/auth
163
166
164
167
<scripttype="text/javascript">
165
168
constauthorizerRef=newauthorizerdev.Authorizer({
166
-
authorizerURL:`AUTHORIZER_URL`,
169
+
authorizerURL:`YOUR_AUTHORIZER_INSTANCE_URL`,
167
170
redirectURL:window.location.origin,
171
+
clientID:'YOUR_CLIENT_ID', // obtain your client id from authorizer dashboard
168
172
});
169
173
170
174
// use the button selector as per your application
@@ -175,15 +179,19 @@ This example demonstrates how you can use [`@authorizerdev/authorizer-js`](/auth
0 commit comments