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
{{ message }}
This repository was archived by the owner on Apr 11, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/usage/oauth.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -112,16 +112,16 @@ You can use the `Shopify.Utils.loadCurrentSession()` method to load an online se
112
112
113
113
As mentioned in the previous sections, you can use the OAuth methods to create both offline and online sessions. Once the process is completed, the session will be stored as per your `Context.SESSION_STORAGE` strategy, and can be retrieved with the below utitilies.
114
114
115
-
- To load an online session:
115
+
- To load a session, you can use the following method. You can load both online and offline sessions from the current request / response objects.
-If you need to load a session for a background job, you can get offline sessions directly from the shop.
120
120
```ts
121
-
awaitShopify.Utils.loadOfflineSession(shop)
121
+
awaitShopify.Utils.loadOfflineSession(shop);
122
122
```
123
123
124
-
The library supports creating both offline and online sessions for the same shop, so it is up to the app to call the appropriate loading method depending on its needs.
124
+
**Note**: the `loadOfflineSession` method does not perform any validations on the `shop` parameter. You should avoid calling it from user inputs or URLs.
0 commit comments