Skip to content

Commit 95a8b41

Browse files
committed
Fixed auth token page
1 parent ddb9b4f commit 95a8b41

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
lines changed
249 KB
Loading

src/content/docs/aws/getting-started/auth-token.md renamed to src/content/docs/aws/getting-started/auth-token.mdx

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ sidebar:
66
order: 3
77
---
88

9+
import { Code, Tabs, TabItem } from '@astrojs/starlight/components';
10+
911
## Introduction
1012

1113
The Auth Token identifies and authenticates users outside the LocalStack Web Application to activate the LocalStack core cloud emulator.
@@ -46,8 +48,7 @@ After initiating your trial or acquiring a license, proceed to assign it to a us
4648
- Click **Save** to complete the assignment.
4749
Single users assign licenses to themselves.
4850

49-
{{< img src="assigning-a-license.png" class="img-fluid shadow rounded" width="800" >}}
50-
<br><br>
51+
![Assigning a license](/images/aws/assigning-a-license.png)
5152

5253
If you have joined a workspace, you need to be assigned a license by the workspace administrator.
5354
In case of switching workspaces or licenses, you need to make sure that you are assigned to the correct license.
@@ -76,16 +77,14 @@ The following sections describe the various methods of setting your Auth Token.
7677

7778
You should set the `LOCALSTACK_AUTH_TOKEN` environment variable either before or during the startup of LocalStack using the `localstack` command-line interface (CLI).
7879

79-
{{< tabpane >}}
80-
{{< tab header="macOS/Linux" lang="shell" >}}
81-
localstack auth set-token <YOUR_AUTH_TOKEN>
82-
localstack start
83-
{{< /tab >}}
84-
{{< tab header="Windows" lang="powershell" >}}
85-
localstack auth set-token <YOUR_AUTH_TOKEN>
86-
localstack start
87-
{{< /tab >}}
88-
{{< /tabpane >}}
80+
<Tabs>
81+
<TabItem label="macOS/Linux">
82+
<Code code={`localstack auth set-token <YOUR_AUTH_TOKEN>\nlocalstack start`} lang="shell" />
83+
</TabItem>
84+
<TabItem label="Windows">
85+
<Code code={`localstack auth set-token <YOUR_AUTH_TOKEN>\nlocalstack start`} lang="powershell" />
86+
</TabItem>
87+
</Tabs>
8988

9089
:::note
9190
1. You can alternatively set the `LOCALSTACK_AUTH_TOKEN` environment variable in your shell session.
@@ -105,14 +104,14 @@ If you are using LocalStack with an Auth Token, it's necessary to download the [
105104

106105
To start LocalStack via Docker, you need to provide the Auth Token using the `-e` flag, which is used for setting environment variables.
107106

108-
{{< command "hl_lines=5" >}}
107+
```bash {5}
109108
$ docker run \
110109
--rm -it \
111110
-p 4566:4566 \
112111
-p 4510-4559:4510-4559 \
113112
-e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:- } \
114113
localstack/localstack-pro
115-
{{< / command >}}
114+
```
116115

117116
For more information about starting LocalStack with Docker, take a look at our [Docker installation](https://docs.localstack.cloud/getting-started/installation/#docker) guide.
118117

@@ -155,22 +154,22 @@ Refer to our [configuration guide](https://docs.localstack.cloud/references/conf
155154

156155
The simplest method to verify if LocalStack is active is by querying the health endpoint for a list of running services:
157156

158-
{{< tabpane text=true >}}
159-
{{< tab header="macOS/Linux" lang="shell" >}}
157+
<Tabs>
158+
<TabItem label="macOS/Linux">
160159

161-
{{< command >}}
162-
$ curl http://localhost:4566/_localstack/info | jq
163-
{{< / command >}}
160+
```bash
161+
curl http://localhost:4566/_localstack/info | jq
162+
```
164163

165-
{{< /tab >}}
166-
{{< tab header="Windows" lang="powershell" >}}
164+
</TabItem>
165+
<TabItem label="Windows">
167166

168-
{{< command >}}
169-
$ Invoke-WebRequest -Uri http://localhost:4566/_localstack/info | ConvertFrom-Json
170-
{{< / command >}}
167+
```bash
168+
Invoke-WebRequest -Uri http://localhost:4566/_localstack/info | ConvertFrom-Json
169+
```
171170

172-
{{< /tab >}}
173-
{{< /tabpane >}}
171+
</TabItem>
172+
</Tabs>
174173

175174
The following output would be retrieved:
176175

@@ -191,9 +190,9 @@ The following output would be retrieved:
191190
You can notice the `edition` field is set to `pro` and the `is_license_activated` field is set to `true`.
192191
Another way to confirm this is by checking the logs of the LocalStack container for a message indicating successful license activation:
193192

194-
{{< command >}}
193+
```bash
195194
[...] Successfully activated license
196-
{{< / command >}}
195+
```
197196

198197
Otherwise, check our [troubleshooting](#troubleshooting) section.
199198

@@ -243,9 +242,9 @@ You can find your Auth Token on the [Auth Tokens page](https://app.localstack.cl
243242

244243
If you are using the `localstack` CLI, you can set the `LOCALSTACK_AUTH_TOKEN` environment variable to your Auth Token or use the following command to set it up:
245244

246-
{{< command >}}
247-
$ localstack auth set-token <YOUR_AUTH_TOKEN>
248-
{{< / command >}}
245+
```bash
246+
localstack auth set-token <YOUR_AUTH_TOKEN>
247+
```
249248

250249
### Invalid License
251250

@@ -257,9 +256,9 @@ You can check your license status in the LocalStack Web Application on the [My L
257256
LocalStack initiates offline activation when the license server is unreachable, requiring re-activation every 24 hours.
258257
Log output may indicate issues with your machine resolving the LocalStack API domain, which can be verified using a tool like `dig`:
259258

260-
{{< command >}}
261-
$ dig api.localstack.cloud
262-
{{< / command >}}
259+
```bash
260+
dig api.localstack.cloud
261+
```
263262

264263
If the result shows a status other than `status: NOERROR`, your machine is unable to resolve this domain.
265264
Certain corporate DNS servers may filter requests to specific domains.

0 commit comments

Comments
 (0)