@capgo/capacitor-social-login 0.0.10

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.
Files changed (35) hide show
  1. package/CapgoCapacitorSocialLogin.podspec +21 -0
  2. package/Package.swift +37 -0
  3. package/README.md +457 -0
  4. package/android/build.gradle +64 -0
  5. package/android/src/main/AndroidManifest.xml +4 -0
  6. package/android/src/main/java/ee/forgr/capacitor/social/login/AppleProvider.java +376 -0
  7. package/android/src/main/java/ee/forgr/capacitor/social/login/FacebookProvider.java +175 -0
  8. package/android/src/main/java/ee/forgr/capacitor/social/login/GoogleProvider.java +305 -0
  9. package/android/src/main/java/ee/forgr/capacitor/social/login/SocialLoginPlugin.java +161 -0
  10. package/android/src/main/java/ee/forgr/capacitor/social/login/helpers/JsonHelper.java +18 -0
  11. package/android/src/main/java/ee/forgr/capacitor/social/login/helpers/SocialProvider.java +13 -0
  12. package/android/src/main/res/.gitkeep +0 -0
  13. package/android/src/main/res/layout/bridge_layout_main.xml +15 -0
  14. package/android/src/main/res/layout/dialog_custom_layout.xml +43 -0
  15. package/android/src/main/res/values/styles.xml +14 -0
  16. package/dist/docs.json +613 -0
  17. package/dist/esm/definitions.d.ts +191 -0
  18. package/dist/esm/definitions.js +2 -0
  19. package/dist/esm/definitions.js.map +1 -0
  20. package/dist/esm/index.d.ts +4 -0
  21. package/dist/esm/index.js +7 -0
  22. package/dist/esm/index.js.map +1 -0
  23. package/dist/esm/web.d.ts +17 -0
  24. package/dist/esm/web.js +29 -0
  25. package/dist/esm/web.js.map +1 -0
  26. package/dist/plugin.cjs.js +43 -0
  27. package/dist/plugin.cjs.js.map +1 -0
  28. package/dist/plugin.js +46 -0
  29. package/dist/plugin.js.map +1 -0
  30. package/ios/Sources/SocialLoginPlugin/AppleProvider.swift +516 -0
  31. package/ios/Sources/SocialLoginPlugin/FacebookProvider.swift +108 -0
  32. package/ios/Sources/SocialLoginPlugin/GoogleProvider.swift +165 -0
  33. package/ios/Sources/SocialLoginPlugin/SocialLoginPlugin.swift +322 -0
  34. package/ios/Tests/SocialLoginPluginTests/SocialLoginPluginTests.swift +15 -0
  35. package/package.json +87 -0
@@ -0,0 +1,191 @@
1
+ export interface InitializeOptions {
2
+ facebook?: {
3
+ /**
4
+ * Facebook App ID, provided by Facebook for web, in mobile it's set in the native files
5
+ */
6
+ appId: string;
7
+ };
8
+ google?: {
9
+ /**
10
+ * The app's client ID, found and created in the Google Developers Console.
11
+ * Common for Android or iOS.
12
+ * The default is defined in the configuration.
13
+ * @example xxxxxx-xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
14
+ * @since 3.1.0
15
+ */
16
+ clientId: string;
17
+ };
18
+ apple?: {
19
+ /**
20
+ * Apple Client ID, provided by Apple
21
+ */
22
+ clientId: string;
23
+ /**
24
+ * Apple Redirect URL, should be your backend url that is configured in your apple app, only for android
25
+ */
26
+ redirectUrl: string;
27
+ };
28
+ }
29
+ export interface FacebookLoginOptions {
30
+ /**
31
+ * Permissions
32
+ * @description select permissions to login with
33
+ */
34
+ permissions: string[];
35
+ }
36
+ export interface GoogleLoginOptions {
37
+ /**
38
+ * Specifies the scopes required for accessing Google APIs
39
+ * The default is defined in the configuration.
40
+ * @example ["profile", "email"]
41
+ * @see [Google OAuth2 Scopes](https://developers.google.com/identity/protocols/oauth2/scopes)
42
+ */
43
+ scopes?: string[];
44
+ /**
45
+ * Set if your application needs to refresh access tokens when the user is not present at the browser.
46
+ * In response use `serverAuthCode` key
47
+ *
48
+ * @default false
49
+ * @since 3.1.0
50
+ * */
51
+ grantOfflineAccess?: boolean;
52
+ }
53
+ export interface GoogleLoginResponse {
54
+ accessToken: AccessToken | null;
55
+ idToken: string | null;
56
+ profile: {
57
+ email: string | null;
58
+ familyName: string | null;
59
+ givenName: string | null;
60
+ id: string | null;
61
+ name: string | null;
62
+ imageUrl: string | null;
63
+ };
64
+ }
65
+ export interface AppleProviderOptions {
66
+ /**
67
+ * Scopes
68
+ * @description select scopes to login with
69
+ */
70
+ scopes?: string[];
71
+ /**
72
+ * Redirect URI
73
+ * @description redirect URI
74
+ */
75
+ redirectURI: string;
76
+ /**
77
+ * Nonce
78
+ * @description nonce
79
+ */
80
+ nonce?: string;
81
+ /**
82
+ * State
83
+ * @description state
84
+ */
85
+ state?: string;
86
+ }
87
+ export interface AppleProviderResponse {
88
+ user: string | null;
89
+ email: string | null;
90
+ givenName: string | null;
91
+ familyName: string | null;
92
+ identityToken: string | null;
93
+ authorizationCode: string;
94
+ }
95
+ export interface LoginOptions {
96
+ /**
97
+ * Provider
98
+ * @description select provider to login with
99
+ */
100
+ provider: "facebook" | "google" | "apple" | "twitter";
101
+ /**
102
+ * Options
103
+ * @description payload to login with
104
+ */
105
+ options: FacebookLoginOptions | GoogleLoginOptions | AppleProviderOptions;
106
+ }
107
+ export interface LoginResult {
108
+ /**
109
+ * Provider
110
+ * @description select provider to login with
111
+ */
112
+ provider: "facebook" | "google" | "apple" | "twitter";
113
+ /**
114
+ * Payload
115
+ * @description payload to login with
116
+ */
117
+ result: FacebookLoginResponse | GoogleLoginResponse | AppleProviderResponse;
118
+ }
119
+ export interface AccessToken {
120
+ applicationId?: string;
121
+ declinedPermissions?: string[];
122
+ expires?: string;
123
+ isExpired?: boolean;
124
+ lastRefresh?: string;
125
+ permissions?: string[];
126
+ token: string;
127
+ userId?: string;
128
+ }
129
+ export interface FacebookLoginResponse {
130
+ accessToken: AccessToken | null;
131
+ profile: {
132
+ fields: readonly string[];
133
+ };
134
+ }
135
+ export interface AuthorizationCode {
136
+ /**
137
+ * Jwt
138
+ * @description A JSON web token
139
+ */
140
+ jwt: string;
141
+ }
142
+ export interface AuthorizationCodeOptions {
143
+ /**
144
+ * Provider
145
+ * @description Provider for the authorization code
146
+ */
147
+ provider: "apple" | "google" | "facebook";
148
+ }
149
+ export interface isLoggedInOptions {
150
+ /**
151
+ * Provider
152
+ * @description Provider for the isLoggedIn
153
+ */
154
+ provider: "apple" | "google" | "facebook";
155
+ }
156
+ export interface SocialLoginPlugin {
157
+ /**
158
+ * Initialize the plugin
159
+ * @description initialize the plugin with the required options
160
+ */
161
+ initialize(options: InitializeOptions): Promise<void>;
162
+ /**
163
+ * Login with the selected provider
164
+ * @description login with the selected provider
165
+ */
166
+ login(options: LoginOptions): Promise<LoginResult>;
167
+ /**
168
+ * Logout
169
+ * @description logout the user
170
+ */
171
+ logout(options: {
172
+ provider: "apple" | "google" | "facebook";
173
+ }): Promise<void>;
174
+ /**
175
+ * IsLoggedIn
176
+ * @description logout the user
177
+ */
178
+ isLoggedIn(options: isLoggedInOptions): Promise<{
179
+ isLoggedIn: boolean;
180
+ }>;
181
+ /**
182
+ * Get the current access token
183
+ * @description get the current access token
184
+ */
185
+ getAuthorizationCode(options: AuthorizationCodeOptions): Promise<AuthorizationCode>;
186
+ /**
187
+ * Refresh the access token
188
+ * @description refresh the access token
189
+ */
190
+ refresh(options: LoginOptions): Promise<void>;
191
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface InitializeOptions {\n facebook?: {\n /**\n * Facebook App ID, provided by Facebook for web, in mobile it's set in the native files\n */\n appId: string;\n };\n\n google?: {\n /**\n * The app's client ID, found and created in the Google Developers Console.\n * Common for Android or iOS.\n * The default is defined in the configuration.\n * @example xxxxxx-xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com\n * @since 3.1.0\n */\n clientId: string;\n };\n apple?: {\n /**\n * Apple Client ID, provided by Apple\n */\n clientId: string;\n /**\n * Apple Redirect URL, should be your backend url that is configured in your apple app, only for android\n */\n redirectUrl: string;\n };\n}\n\nexport interface FacebookLoginOptions {\n /**\n * Permissions\n * @description select permissions to login with\n */\n permissions: string[];\n}\n\nexport interface GoogleLoginOptions {\n /**\n * Specifies the scopes required for accessing Google APIs\n * The default is defined in the configuration.\n * @example [\"profile\", \"email\"]\n * @see [Google OAuth2 Scopes](https://developers.google.com/identity/protocols/oauth2/scopes)\n */\n scopes?: string[];\n\n /**\n * Set if your application needs to refresh access tokens when the user is not present at the browser.\n * In response use `serverAuthCode` key\n *\n * @default false\n * @since 3.1.0\n * */\n grantOfflineAccess?: boolean;\n}\n\nexport interface GoogleLoginResponse {\n accessToken: AccessToken | null;\n idToken: string | null;\n profile: {\n email: string | null;\n familyName: string | null;\n givenName: string | null;\n id: string | null;\n name: string | null;\n imageUrl: string | null;\n };\n}\n\nexport interface AppleProviderOptions {\n /**\n * Scopes\n * @description select scopes to login with\n */\n scopes?: string[];\n /**\n * Redirect URI\n * @description redirect URI\n */\n redirectURI: string;\n /**\n * Nonce\n * @description nonce\n */\n nonce?: string;\n /**\n * State\n * @description state\n */\n state?: string;\n}\n\nexport interface AppleProviderResponse {\n user: string | null;\n email: string | null;\n givenName: string | null;\n familyName: string | null;\n identityToken: string | null;\n authorizationCode: string;\n}\n\nexport interface LoginOptions {\n /**\n * Provider\n * @description select provider to login with\n */\n provider: \"facebook\" | \"google\" | \"apple\" | \"twitter\";\n /**\n * Options\n * @description payload to login with\n */\n options: FacebookLoginOptions | GoogleLoginOptions | AppleProviderOptions;\n}\n\nexport interface LoginResult {\n /**\n * Provider\n * @description select provider to login with\n */\n provider: \"facebook\" | \"google\" | \"apple\" | \"twitter\";\n /**\n * Payload\n * @description payload to login with\n */\n result: FacebookLoginResponse | GoogleLoginResponse | AppleProviderResponse;\n}\n\nexport interface AccessToken {\n applicationId?: string;\n declinedPermissions?: string[];\n expires?: string;\n isExpired?: boolean;\n lastRefresh?: string;\n permissions?: string[];\n token: string;\n userId?: string;\n}\n\nexport interface FacebookLoginResponse {\n accessToken: AccessToken | null;\n profile: {\n fields: readonly string[];\n };\n}\n\nexport interface AuthorizationCode {\n /**\n * Jwt\n * @description A JSON web token\n */\n jwt: string;\n}\n\nexport interface AuthorizationCodeOptions {\n /**\n * Provider\n * @description Provider for the authorization code\n */\n provider: \"apple\" | \"google\" | \"facebook\";\n}\n\nexport interface isLoggedInOptions {\n /**\n * Provider\n * @description Provider for the isLoggedIn\n */\n provider: \"apple\" | \"google\" | \"facebook\";\n}\n\nexport interface SocialLoginPlugin {\n /**\n * Initialize the plugin\n * @description initialize the plugin with the required options\n */\n initialize(options: InitializeOptions): Promise<void>;\n /**\n * Login with the selected provider\n * @description login with the selected provider\n */\n login(options: LoginOptions): Promise<LoginResult>;\n /**\n * Logout\n * @description logout the user\n */\n logout(options: { provider: \"apple\" | \"google\" | \"facebook\" }): Promise<void>;\n /**\n * IsLoggedIn\n * @description logout the user\n */\n isLoggedIn(options: isLoggedInOptions): Promise<{ isLoggedIn: boolean }>;\n\n /**\n * Get the current access token\n * @description get the current access token\n */\n getAuthorizationCode(\n options: AuthorizationCodeOptions,\n ): Promise<AuthorizationCode>;\n /**\n * Refresh the access token\n * @description refresh the access token\n */\n refresh(options: LoginOptions): Promise<void>;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { SocialLoginPlugin } from "./definitions";
2
+ declare const SocialLogin: SocialLoginPlugin;
3
+ export * from "./definitions";
4
+ export { SocialLogin };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from "@capacitor/core";
2
+ const SocialLogin = registerPlugin("SocialLogin", {
3
+ web: () => import("./web").then((m) => new m.SocialLoginWeb()),
4
+ });
5
+ export * from "./definitions";
6
+ export { SocialLogin };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,WAAW,GAAG,cAAc,CAAoB,aAAa,EAAE;IACnE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;CAC/D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\n\nimport type { SocialLoginPlugin } from \"./definitions\";\n\nconst SocialLogin = registerPlugin<SocialLoginPlugin>(\"SocialLogin\", {\n web: () => import(\"./web\").then((m) => new m.SocialLoginWeb()),\n});\n\nexport * from \"./definitions\";\nexport { SocialLogin };\n"]}
@@ -0,0 +1,17 @@
1
+ import { WebPlugin } from "@capacitor/core";
2
+ import type { SocialLoginPlugin, InitializeOptions, LoginOptions, LoginResult, AuthorizationCode } from "./definitions";
3
+ export declare class SocialLoginWeb extends WebPlugin implements SocialLoginPlugin {
4
+ getAuthorizationCode(): Promise<AuthorizationCode>;
5
+ echo(options: {
6
+ value: string;
7
+ }): Promise<{
8
+ value: string;
9
+ }>;
10
+ initialize(options: InitializeOptions): Promise<void>;
11
+ login(options: LoginOptions): Promise<LoginResult>;
12
+ logout(options: any): Promise<void>;
13
+ refresh(options: LoginOptions): Promise<void>;
14
+ isLoggedIn(options: any): Promise<{
15
+ isLoggedIn: boolean;
16
+ }>;
17
+ }
@@ -0,0 +1,29 @@
1
+ import { WebPlugin } from "@capacitor/core";
2
+ export class SocialLoginWeb extends WebPlugin {
3
+ getAuthorizationCode() {
4
+ console.log("getCurrentUser");
5
+ return null;
6
+ }
7
+ async echo(options) {
8
+ console.log("ECHO", options);
9
+ return options;
10
+ }
11
+ async initialize(options) {
12
+ console.log("INITIALIZE", options);
13
+ }
14
+ async login(options) {
15
+ console.log("LOGIN", options);
16
+ return null;
17
+ }
18
+ async logout(options) {
19
+ console.log("LOGOUT", options);
20
+ }
21
+ async refresh(options) {
22
+ console.log("REFRESH", options);
23
+ }
24
+ async isLoggedIn(options) {
25
+ console.log("isLoggedIn", options);
26
+ return { isLoggedIn: false };
27
+ }
28
+ }
29
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU5C,MAAM,OAAO,cAAe,SAAQ,SAAS;IAC3C,oBAAoB;QAClB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC9B,OAAO,IAAW,CAAC;IACrB,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,OAA0B;QACzC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC/B,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9B,OAAO,IAAW,CAAC;IACrB,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAY;QACvB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,OAAqB;QACjC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,OAAY;QAC3B,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;IAC/B,CAAC;CACF","sourcesContent":["import { WebPlugin } from \"@capacitor/core\";\n\nimport type {\n SocialLoginPlugin,\n InitializeOptions,\n LoginOptions,\n LoginResult,\n AuthorizationCode,\n} from \"./definitions\";\n\nexport class SocialLoginWeb extends WebPlugin implements SocialLoginPlugin {\n getAuthorizationCode(): Promise<AuthorizationCode> {\n console.log(\"getCurrentUser\");\n return null as any;\n }\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log(\"ECHO\", options);\n return options;\n }\n async initialize(options: InitializeOptions): Promise<void> {\n console.log(\"INITIALIZE\", options);\n }\n async login(options: LoginOptions): Promise<LoginResult> {\n console.log(\"LOGIN\", options);\n return null as any;\n }\n async logout(options: any): Promise<void> {\n console.log(\"LOGOUT\", options);\n }\n async refresh(options: LoginOptions): Promise<void> {\n console.log(\"REFRESH\", options);\n }\n async isLoggedIn(options: any): Promise<{ isLoggedIn: boolean }> {\n console.log(\"isLoggedIn\", options);\n return { isLoggedIn: false };\n }\n}\n"]}
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var core = require('@capacitor/core');
4
+
5
+ const SocialLogin = core.registerPlugin("SocialLogin", {
6
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SocialLoginWeb()),
7
+ });
8
+
9
+ class SocialLoginWeb extends core.WebPlugin {
10
+ getAuthorizationCode() {
11
+ console.log("getCurrentUser");
12
+ return null;
13
+ }
14
+ async echo(options) {
15
+ console.log("ECHO", options);
16
+ return options;
17
+ }
18
+ async initialize(options) {
19
+ console.log("INITIALIZE", options);
20
+ }
21
+ async login(options) {
22
+ console.log("LOGIN", options);
23
+ return null;
24
+ }
25
+ async logout(options) {
26
+ console.log("LOGOUT", options);
27
+ }
28
+ async refresh(options) {
29
+ console.log("REFRESH", options);
30
+ }
31
+ async isLoggedIn(options) {
32
+ console.log("isLoggedIn", options);
33
+ return { isLoggedIn: false };
34
+ }
35
+ }
36
+
37
+ var web = /*#__PURE__*/Object.freeze({
38
+ __proto__: null,
39
+ SocialLoginWeb: SocialLoginWeb
40
+ });
41
+
42
+ exports.SocialLogin = SocialLogin;
43
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst SocialLogin = registerPlugin(\"SocialLogin\", {\n web: () => import(\"./web\").then((m) => new m.SocialLoginWeb()),\n});\nexport * from \"./definitions\";\nexport { SocialLogin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class SocialLoginWeb extends WebPlugin {\n getAuthorizationCode() {\n console.log(\"getCurrentUser\");\n return null;\n }\n async echo(options) {\n console.log(\"ECHO\", options);\n return options;\n }\n async initialize(options) {\n console.log(\"INITIALIZE\", options);\n }\n async login(options) {\n console.log(\"LOGIN\", options);\n return null;\n }\n async logout(options) {\n console.log(\"LOGOUT\", options);\n }\n async refresh(options) {\n console.log(\"REFRESH\", options);\n }\n async isLoggedIn(options) {\n console.log(\"isLoggedIn\", options);\n return { isLoggedIn: false };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,WAAW,GAAGA,mBAAc,CAAC,aAAa,EAAE;AAClD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;AAClE,CAAC;;ACFM,MAAM,cAAc,SAASC,cAAS,CAAC;AAC9C,IAAI,oBAAoB,GAAG;AAC3B,QAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACtC,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK;AACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC3C,KAAK;AACL,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE;AACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACtC,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK;AACL,IAAI,MAAM,MAAM,CAAC,OAAO,EAAE;AAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACvC,KAAK;AACL,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE;AAC3B,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACxC,KAAK;AACL,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC3C,QAAQ,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;AACrC,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,46 @@
1
+ var capacitorCapacitorUpdater = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ const SocialLogin = core.registerPlugin("SocialLogin", {
5
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SocialLoginWeb()),
6
+ });
7
+
8
+ class SocialLoginWeb extends core.WebPlugin {
9
+ getAuthorizationCode() {
10
+ console.log("getCurrentUser");
11
+ return null;
12
+ }
13
+ async echo(options) {
14
+ console.log("ECHO", options);
15
+ return options;
16
+ }
17
+ async initialize(options) {
18
+ console.log("INITIALIZE", options);
19
+ }
20
+ async login(options) {
21
+ console.log("LOGIN", options);
22
+ return null;
23
+ }
24
+ async logout(options) {
25
+ console.log("LOGOUT", options);
26
+ }
27
+ async refresh(options) {
28
+ console.log("REFRESH", options);
29
+ }
30
+ async isLoggedIn(options) {
31
+ console.log("isLoggedIn", options);
32
+ return { isLoggedIn: false };
33
+ }
34
+ }
35
+
36
+ var web = /*#__PURE__*/Object.freeze({
37
+ __proto__: null,
38
+ SocialLoginWeb: SocialLoginWeb
39
+ });
40
+
41
+ exports.SocialLogin = SocialLogin;
42
+
43
+ return exports;
44
+
45
+ })({}, capacitorExports);
46
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst SocialLogin = registerPlugin(\"SocialLogin\", {\n web: () => import(\"./web\").then((m) => new m.SocialLoginWeb()),\n});\nexport * from \"./definitions\";\nexport { SocialLogin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class SocialLoginWeb extends WebPlugin {\n getAuthorizationCode() {\n console.log(\"getCurrentUser\");\n return null;\n }\n async echo(options) {\n console.log(\"ECHO\", options);\n return options;\n }\n async initialize(options) {\n console.log(\"INITIALIZE\", options);\n }\n async login(options) {\n console.log(\"LOGIN\", options);\n return null;\n }\n async logout(options) {\n console.log(\"LOGOUT\", options);\n }\n async refresh(options) {\n console.log(\"REFRESH\", options);\n }\n async isLoggedIn(options) {\n console.log(\"isLoggedIn\", options);\n return { isLoggedIn: false };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,WAAW,GAAGA,mBAAc,CAAC,aAAa,EAAE;IAClD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;IAClE,CAAC;;ICFM,MAAM,cAAc,SAASC,cAAS,CAAC;IAC9C,IAAI,oBAAoB,GAAG;IAC3B,QAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACtC,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK;IACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3C,KAAK;IACL,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE;IACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK;IACL,IAAI,MAAM,MAAM,CAAC,OAAO,EAAE;IAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvC,KAAK;IACL,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE;IAC3B,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxC,KAAK;IACL,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3C,QAAQ,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;IACrC,KAAK;IACL;;;;;;;;;;;;;;;"}