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: docs/fern/docs/pages-template/faq.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,19 @@ subtitle: Frequently asked questions about Stack
6
6
## Languages & Frameworks
7
7
<AccordionGroup>
8
8
<Accordiontitle="What languages are supported?">
9
-
In the frontend, Stack supports TypeScript and JavaScript with Next.js. In the backend, Stack has a flexible [REST API](/rest-api) that can be used with any language or framework.
9
+
For frontends, Stack supports TypeScript and JavaScript. For backends, Stack has a flexible [REST API](/rest-api) that can be used with any language or framework.
10
10
</Accordion>
11
11
<Accordiontitle="Can I use Stack with other JavaScript frameworks, like Astro or Angular?">
12
-
While you can use any backend framework with Stack, the frontend is tightly integrated with Next.js. If you want to use a different frontend framework, you will have to build the integration ourselves with the client endpoints of our [REST API](/rest-api). Some members of our community have started projects to do this, so you may want to join [our Discord](https://discord.stack-auth.com) to coordinate with them.
12
+
Yes! You can use our vanilla JavaScript SDK, or, if the framework is React-based, our React SDK.
13
13
</Accordion>
14
14
<Accordiontitle="Can I use Stack with the Next.js pages router?">
15
-
Only the Next.js app router is currently supported. However, just like any other unsupported framework, you can use the client endpoints of our [REST API](/rest-api) to build your own integration.
15
+
Only the Next.js app router is currently officially supported, although some members of the community have successfully used the React or vanilla JavaScript SDKs with the pages router.
Copy file name to clipboardExpand all lines: docs/fern/docs/pages-template/getting-started/setup.mdx
+74Lines changed: 74 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -387,4 +387,78 @@ We recommend using our **setup wizard** for a seamless installation experience.
387
387
388
388
Check out the [Users](./users.mdx) to learn how to retrieve and update user information, or [Example pages](./example-pages.mdx) to see how to build your sign-in/up pages.
389
389
390
+
391
+
{/* ELSE_IF_PLATFORM python */}
392
+
393
+
<Info>
394
+
Welcome to the Python setup guide. If you're looking for guides for other frameworks, check out the [Next.js SDK Setup](../../pages-next/getting-started/setup.mdx), [React SDK Setup](../../pages-react/getting-started/setup.mdx), or the [JavaScript SDK Setup](../../pages-js/getting-started/setup.mdx).
395
+
</Info>
396
+
397
+
Our recommended way to use Stack Auth with Python is with the [REST API](../rest-api/overview.mdx). It provides a fully documented way to interact with Stack Auth from any Python framework, including Flask, FastAPI, and Django.
398
+
399
+
For the purpose of this guide, we will use the `requests` library to make HTTP requests to the Stack Auth API. If you haven't already, you can install it in your environment with `pip install requests`.
400
+
401
+
<Steps>
402
+
### Create API keys
403
+
404
+
First, create an account on [the Stack Auth dashboard](https://app.stack-auth.com/projects), and copy your project ID, publishable client key, and secret server key into a safe place (eg. environment variables).
405
+
406
+
From there, you can access them in your Python code. You can then read them like this:
If you're building a backend server, most likely you'll want to use the currently signed in user's access token. Most normally, you would send this with all your requests to the backend in an HTTP header.
446
+
447
+
In Stack Auth's JavaScript SDK, you can retrieve the access token [from the `stackClientApp` object](/sdk/types/user#currentusergetauthjson). Then, you can use said access token to make requests to Stack Auth:
448
+
449
+
```python
450
+
access_token =# access token retrieved from the JavaScript SDK
Check out the [REST API documentation](../rest-api/overview.mdx) to learn more about the available endpoints and how to use them in your Python application.
Copy file name to clipboardExpand all lines: docs/fern/docs/pages-template/overview.mdx
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,13 +22,15 @@ You can get started in five minutes with our [setup guide](./getting-started/set
22
22
Use our pre-built React components, or create your own
23
23
</Card>
24
24
{/* END_PLATFORM */}
25
+
{/* IF_PLATFORM: js-like */}
25
26
<Card
26
27
title="SDK Reference"
27
28
icon="fa-regular fa-file-lines"
28
29
href="/sdk"
29
30
>
30
-
Learn how to use Stack's SDK
31
+
Learn how to use Stack Auth's SDK
31
32
</Card>
33
+
{/* END_PLATFORM */}
32
34
<Card
33
35
title="REST API Reference"
34
36
icon="fa-solid fa-code"
@@ -40,17 +42,17 @@ You can get started in five minutes with our [setup guide](./getting-started/set
40
42
41
43
Still have questions? Check out our [FAQ](/faq) or [join our Discord](https://discord.stack-auth.com).
42
44
43
-
## Why Choose Stack?
45
+
## Why Choose Stack Auth?
44
46
45
47
Authentication is inherently difficult. Few things are more sensitive than user data and more complex than cryptography. Not surprisingly, many online businesses struggle to get it right.
46
48
47
49
The optimal authentication solution should be secure, yet approachable. If developers need to worry about JWTs, OAuth flows, or password hashing, then the authentication solution has failed its purpose. If an authentication solution uses closed-source, unauditable code for the most critical parts of your application, then we have failed.
48
50
49
51
In truth, the authentication services industry has collectively failed. It's dominated by proprietary giants with predatory "bait-and-switch" pricing, providing no transparency into their codebase and delivering a subpar developer experience — because they know enterprises will pay more if setting up auth systems is painful.
50
52
51
-
That's why we built Stack. Integrating secure authentication into your app should take **5 minutes**, not 5 days.
53
+
That's why we built Stack Auth. Integrating secure authentication into your app should take **5 minutes**, not 5 days.
52
54
53
-
At the core of Stack are deep integrations into frontend and backend frameworks. We offer the best developer experience with Next.js. Instead of providing mediocre support for numerous frameworks, we focused on making a few integrations excellent before adding new ones. We also offer a cross-compatible REST API as a fallback.
55
+
At the core of Stack Auth are deep integrations into frontend and backend frameworks. We offer the best developer experience with Next.js. Instead of providing mediocre support for numerous frameworks, we focused on making a few integrations excellent before adding new ones. We also offer a cross-compatible REST API as a fallback.
54
56
55
57
Here's an example. To get the current user, simply call:
56
58
@@ -61,7 +63,7 @@ export function MyComponent() {
61
63
}
62
64
```
63
65
64
-
That's it! Stack will either return a User object or redirect the user to the login page.
66
+
That's it! Stack Auth will either return a User object or redirect the user to the login page.
65
67
66
68
You can also add a button to change the user's name:
67
69
@@ -100,9 +102,9 @@ To manage everything efficiently, there is a powerful admin dashboard:
100
102
101
103

102
104
103
-
Best of all, Stack is **100% open-source**. This means the client, server, dashboard, and even this documentation you're reading right now. Check out our [GitHub](https://github.com/stack-auth/stack-auth) to open an issue or pull request.
105
+
Best of all, Stack Auth is **100% open-source**. This means the client, server, dashboard, and even this documentation you're reading right now. Check out our [GitHub](https://github.com/stack-auth/stack-auth) to open an issue or pull request.
104
106
105
-
This is just a glimpse of what Stack can do. Stack also handles many other tasks like backend integration, data storage, emails, teams, permissions, and more, which you will learn about later in the documentation.
107
+
This is just a glimpse of what Stack Auth can do. We also handle many other tasks like backend integration, data storage, emails, teams, permissions, and more, which you will learn about later in the documentation.
106
108
107
109
If this sounds interesting, [get started](/getting-started/setup) with our interactive setup wizard, or join [our Discord community](https://discord.stack-auth.com) to ask questions and get help from our team.
0 commit comments