@intra-mart/smartlime 0.0.1-beta → 1.0.0-dev.20230227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,7 @@ export type StartAuthResult = {
19
19
  };
20
20
  export declare const IMPrompt: {
21
21
  readonly Login: Prompt.Login;
22
+ readonly None: Prompt.None;
22
23
  };
23
24
  interface RequestConfig {
24
25
  redirectUri: string;
@@ -26,7 +27,7 @@ interface RequestConfig {
26
27
  clientSecret: string;
27
28
  scopes: string[];
28
29
  state?: string;
29
- prompt?: Prompt.Login;
30
+ prompt?: Prompt.Login | Prompt.None;
30
31
  }
31
32
  interface IMOAuthProps {
32
33
  children: JSX.Element;
@@ -12,6 +12,7 @@ const DEFAULT_STORAGE_KEY = '@example:IMAuthKey';
12
12
  const DEFAULT_REMAINING_TIME_TO_RUN_REFRESH = 360000;
13
13
  export const IMPrompt = {
14
14
  Login: Prompt.Login,
15
+ None: Prompt.None,
15
16
  };
16
17
  const baseRequestConfig = {
17
18
  responseType: 'code',
@@ -22,6 +23,11 @@ const useRequestConfig = (userProps) => {
22
23
  return {
23
24
  ...baseRequestConfig,
24
25
  ...userProps,
26
+ /*
27
+ error can occur during authorization due to iap session control.
28
+ default to "login" which destroy the session every time to prevent error.
29
+ */
30
+ prompt: userProps.prompt ? userProps.prompt : IMPrompt.Login,
25
31
  extraParams: {
26
32
  redirect_uri: userProps.redirectUri,
27
33
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@intra-mart/smartlime",
3
3
  "description": "expoで使用できるintra mart accelplatform SDK",
4
- "version": "0.0.1-beta",
4
+ "version": "1.0.0-dev.20230227",
5
5
  "keywords": [
6
6
  "intra-mart",
7
7
  "AccelPlatform",
package/.gitattributes DELETED
@@ -1 +0,0 @@
1
- * text=auto eol=crlf