Skip to content

Commit ef78112

Browse files
fixed passport setup tutorial and prompt
1 parent 95ec963 commit ef78112

2 files changed

Lines changed: 28 additions & 38 deletions

File tree

examples/passport/_prompts/tutorial-generation-setup.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ Overview of different configuration patterns demonstrated
3030

3131
Link to GitHub repository using the required format
3232
<div class="display-none">
33+
3334
# Passport Setup with NextJS
35+
3436
</div>
3537

3638
[App description]
3739

3840
<div class="button-component">
41+
3942
[View app on Github](<link>) <span class="button-component-arrow">→</span>
43+
4044
</div>
4145

4246
### Configuration Patterns Overview
@@ -46,9 +50,12 @@ Link to GitHub repository using the required format
4650
### Implementation Details
4751
For each configuration pattern:
4852
- Configuration Name: Brief description of what this configuration achieves
49-
- Source Code: Link to relevant source code file
50-
- Configuration Details: Code snippet showing the configuration
51-
- Behavior Explanation: Clear explanation of how this configuration affects Passport behavior
53+
- Brief description of what the configuration does.
54+
- Code snippets showing how the instance is configured (CodeBlock should be linked to the relevant github repo) IMPORTANT: related snippets should be under a single code block rather than dividing them across multiple codeblocks. However, pls ensure that you only include the relevant snippets (method calls, etc) and not Next.js specific features(states, etc WHEN it's irrelevant) to ensure that the focus is to the most most important code snippet relevant to the feature.
55+
- Example structure: ```typescript title="<configuration name>" manualLink="<github repo link containing the code snippet(don't specify the line, just the file's link)>"
56+
<code snippet>
57+
```
58+
- Clear explanation of how the code works
5259
- Use Cases: When to use this configuration pattern
5360

5461
### Key configurations to document:

examples/passport/setup-with-nextjs/tutorial.md

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<div class="display-none">
2+
23
# Passport Setup with NextJS
4+
35
</div>
46

57
Learn how to initialize and configure the Immutable Passport SDK in a Next.js application with various configuration options. This example demonstrates different initialization patterns that affect UI overlays, scope settings, and logout behavior.
68

79
<div class="button-component">
10+
811
[View app on Github](https://github.com/immutable/ts-immutable-sdk/tree/main/examples/passport/setup-with-nextjs) <span class="button-component-arrow">→</span>
12+
913
</div>
1014

1115
## Configuration Patterns Overview
@@ -23,12 +27,9 @@ This example demonstrates the following Passport configuration patterns:
2327

2428
### Default Configuration
2529

26-
**Description**: Standard initialization of the Passport SDK with default settings.
27-
28-
**Source Code**: [setupDefault.ts](https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts#L4-L14)
30+
Standard initialization of the Passport SDK with default settings.
2931

30-
**Configuration Details**:
31-
```typescript
32+
```typescript title="Default Configuration" manualLink="https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts"
3233
const passportInstance = new passport.Passport({
3334
baseConfig: {
3435
environment: config.Environment.SANDBOX,
@@ -51,12 +52,9 @@ const passportInstance = new passport.Passport({
5152

5253
### Disabled Popup Overlays
5354

54-
**Description**: Configuration that disables all popup overlays.
55-
56-
**Source Code**: [setupDefault.ts](https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts#L17-L30)
55+
This configuration disables both generic and blocked popup overlays, which are normally shown when popup windows are opened or blocked.
5756

58-
**Configuration Details**:
59-
```typescript
57+
```typescript title="Disabled Popup Overlays" manualLink="https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts"
6058
const passportInstanceWithDisabledOverlays = new passport.Passport({
6159
baseConfig: {
6260
environment: config.Environment.SANDBOX,
@@ -80,12 +78,9 @@ const passportInstanceWithDisabledOverlays = new passport.Passport({
8078

8179
### Minimal Scopes
8280

83-
**Description**: Configuration using only the minimum required scopes.
81+
Configuration using only the minimum required scopes.
8482

85-
**Source Code**: [setupDefault.ts](https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts#L33-L43)
86-
87-
**Configuration Details**:
88-
```typescript
83+
```typescript title="Minimal Scopes" manualLink="https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts"
8984
const passportInstanceWithMinimalScopes = new passport.Passport({
9085
baseConfig: {
9186
environment: config.Environment.SANDBOX,
@@ -108,12 +103,9 @@ const passportInstanceWithMinimalScopes = new passport.Passport({
108103

109104
### All Scopes
110105

111-
**Description**: Configuration with all available scopes.
112-
113-
**Source Code**: [setupDefault.ts](https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts#L46-L56)
106+
Configuration with all available scopes.
114107

115-
**Configuration Details**:
116-
```typescript
108+
```typescript title="All Scopes" manualLink="https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts"
117109
const passportInstanceWithAllScopes = new passport.Passport({
118110
baseConfig: {
119111
environment: config.Environment.SANDBOX,
@@ -136,12 +128,9 @@ const passportInstanceWithAllScopes = new passport.Passport({
136128

137129
### Silent Logout
138130

139-
**Description**: Configuration using silent logout mode.
140-
141-
**Source Code**: [setupDefault.ts](https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts#L59-L70)
131+
Configuration using silent logout mode.
142132

143-
**Configuration Details**:
144-
```typescript
133+
```typescript title="Silent Logout" manualLink="https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts"
145134
const passportInstanceWithSilentLogout = new passport.Passport({
146135
baseConfig: {
147136
environment: config.Environment.SANDBOX,
@@ -165,12 +154,9 @@ const passportInstanceWithSilentLogout = new passport.Passport({
165154

166155
### Generic Overlay Disabled
167156

168-
**Description**: Configuration with only the generic popup overlay disabled.
157+
Configuration with only the generic popup overlay disabled.
169158

170-
**Source Code**: [setupDefault.ts](https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts#L73-L86)
171-
172-
**Configuration Details**:
173-
```typescript
159+
```typescript title="Generic Overlay Disabled" manualLink="https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts"
174160
const passportInstanceWithGenericOverlayDisabled = new passport.Passport({
175161
baseConfig: {
176162
environment: config.Environment.SANDBOX,
@@ -196,12 +182,9 @@ const passportInstanceWithGenericOverlayDisabled = new passport.Passport({
196182

197183
### Blocked Overlay Disabled
198184

199-
**Description**: Configuration with only the blocked popup overlay disabled.
200-
201-
**Source Code**: [setupDefault.ts](https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts#L89-L102)
185+
Configuration with only the blocked popup overlay disabled.
202186

203-
**Configuration Details**:
204-
```typescript
187+
```typescript title="Blocked Overlay Disabled" manualLink="https://github.com/immutable/ts-immutable-sdk/blob/main/examples/passport/setup-with-nextjs/src/app/utils/setupDefault.ts"
205188
const passportInstanceWithBlockedOverlayDisabled = new passport.Passport({
206189
baseConfig: {
207190
environment: config.Environment.SANDBOX,

0 commit comments

Comments
 (0)