@tapni/auth 1.0.3 → 1.0.4
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.
- package/dist/.vite/manifest.json +96 -0
- package/dist/Account-zep_QUuI.js +153 -0
- package/dist/Apps-B9XB7Z7q.js +112 -0
- package/dist/CustomApp-BzUsyycz.js +112 -0
- package/dist/General-DkcdjPYQ.js +477 -0
- package/dist/QR-PW6cAG5j.js +41 -0
- package/dist/TapniAuth.es.js +4 -0
- package/dist/TapniAuth.umd.js +141 -0
- package/dist/install-BzPu9V_c.js +18428 -0
- package/dist/style.css +1 -0
- package/dist/web-AXRKjAOB.js +92 -0
- package/dist/web-IFGkBi0t.js +86 -0
- package/dist/web-LIfHmYL2.js +54 -0
- package/dist/web-XbruGdlD.js +121 -0
- package/package.json +1 -1
- package/dist/assets/Account-CElX1bG1.js +0 -1
- package/dist/assets/Apps-B-GkviQb.css +0 -1
- package/dist/assets/Apps-DH6XpQ6k.js +0 -1
- package/dist/assets/CustomApp-D-PMGrCn.js +0 -1
- package/dist/assets/CustomApp-x1ZBgKin.css +0 -1
- package/dist/assets/General-BD2qnORR.js +0 -1
- package/dist/assets/General-OSR9oXHj.css +0 -1
- package/dist/assets/Inter-ZO3WBJgw.ttf +0 -0
- package/dist/assets/QR-CpmQl6vr.js +0 -1
- package/dist/assets/fontawesome-webfont-CQDK8MU3.ttf +0 -0
- package/dist/assets/fontawesome-webfont-DXgy9qkh.svg +0 -2671
- package/dist/assets/fontawesome-webfont-G5YE5S7X.eot +0 -0
- package/dist/assets/index-CNOQuLc_.css +0 -1
- package/dist/assets/index-DXEfDC45.js +0 -176
- package/dist/assets/web-1uupGAU9.js +0 -5
- package/dist/assets/web-BMHaq5cV.js +0 -1
- package/dist/assets/web-CvQGphDR.js +0 -1
- package/dist/assets/web-DMittTOZ.js +0 -1
- package/dist/assets/web-DhQdITWf.js +0 -1
- package/dist/assets/web-EiIhTtxC.js +0 -1
- package/dist/assets/web-OwpPF4YF.js +0 -1
- package/dist/index.html +0 -36
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{W as j}from"./index-DXEfDC45.js";var w={exports:{}};/*!
|
|
2
|
-
* $script.js JS loader & dependency manager
|
|
3
|
-
* https://github.com/ded/script.js
|
|
4
|
-
* (c) Dustin Diaz 2014 | License MIT
|
|
5
|
-
*/(function(y){(function(i,p){y.exports?y.exports=p():this[i]=p()})("$script",function(){var i=document,p=i.getElementsByTagName("head")[0],I=!1,m="push",S="readyState",A="onreadystatechange",s={},o={},d={},f,v;function g(e,t){for(var n=0,u=e.length;n<u;++n)if(!t(e[n]))return I;return 1}function h(e,t){g(e,function(n){return t(n),1})}function l(e,t,n){e=e[m]?e:[e];var u=t&&t.call,r=u?t:n,W=u?e.join(""):t,N=e.length;function b(c){return c.call?c():s[c]}function _(){if(!--N){s[W]=1,r&&r();for(var c in o)g(c.split("|"),b)&&!h(o[c],b)&&(o[c]=[])}}return setTimeout(function(){h(e,function c(a,U){if(a===null)return _();if(!U&&!/^https?:\/\//.test(a)&&f&&(a=a.indexOf(".js")===-1?f+a+".js":f+a),d[a])return d[a]==2?_():setTimeout(function(){c(a,!0)},0);d[a]=1,x(a,_)})},0),l}function x(e,t){var n=i.createElement("script"),u;n.onload=n.onerror=n[A]=function(){n[S]&&!/^c|loade/.test(n[S])||u||(n.onload=n[A]=null,u=1,d[e]=2,t())},n.async=1,n.src=v?e+(e.indexOf("?")===-1?"?":"&")+v:e,p.insertBefore(n,p.lastChild)}return l.get=x,l.order=function(e,t,n){(function u(r){r=e.shift(),e.length?l(r,u):l(r,t,n)})()},l.path=function(e){f=e},l.urlArgs=function(e){v=e},l.ready=function(e,t,n){e=e[m]?e:[e];var u=[];return!h(e,function(r){s[r]||u[m](r)})&&g(e,function(r){return s[r]})?t():function(r){o[r]=o[r]||[],o[r][m](t),n&&n(u)}(e.join("|")),l},l.done=function(e){l([null],e)},l})})(w);var z=w.exports;class P extends j{constructor(){super({name:"SignInWithApple",platforms:["web"]}),this.appleScriptUrl="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",this.isAppleScriptLoaded=!1}async authorize(i){return new Promise((p,I)=>{i?this.loadSignInWithAppleJS().then(m=>{var S,A,s;this.isAppleScriptLoaded=m,this.isAppleScriptLoaded?(AppleID.auth.init({clientId:i.clientId,redirectURI:i.redirectURI,scope:(S=i.scopes)!==null&&S!==void 0?S:void 0,state:(A=i.state)!==null&&A!==void 0?A:void 0,nonce:(s=i.nonce)!==null&&s!==void 0?s:void 0,usePopup:!0}),AppleID.auth.signIn().then(o=>{var d,f,v,g,h;const l={response:{user:null,email:(d=o.user)===null||d===void 0?void 0:d.email,givenName:(v=(f=o.user)===null||f===void 0?void 0:f.name)===null||v===void 0?void 0:v.firstName,familyName:(h=(g=o.user)===null||g===void 0?void 0:g.name)===null||h===void 0?void 0:h.lastName,identityToken:o.authorization.id_token,authorizationCode:o.authorization.code}};p(l)}).catch(o=>{I(o)})):I("Unable to load Sign in with Apple JS framework.")}):I("No options were provided.")})}loadSignInWithAppleJS(){return new Promise(i=>{this.isAppleScriptLoaded?i(!0):typeof window!==void 0?z.get(this.appleScriptUrl,()=>i(!0)):i(!1)})}}export{P as SignInWithAppleWeb};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as w}from"./index-DXEfDC45.js";class y extends w{async getId(){return{identifier:this.getUid()}}async getInfo(){if(typeof navigator>"u"||!navigator.userAgent)throw this.unavailable("Device API not available in this browser");const e=navigator.userAgent,i=this.parseUa(e);return{model:i.model,platform:"web",operatingSystem:i.operatingSystem,osVersion:i.osVersion,manufacturer:navigator.vendor,isVirtual:!1,webViewVersion:i.browserVersion}}async getBatteryInfo(){if(typeof navigator>"u"||!navigator.getBattery)throw this.unavailable("Device API not available in this browser");let e={};try{e=await navigator.getBattery()}catch{}return{batteryLevel:e.level,isCharging:e.charging}}async getLanguageCode(){return{value:navigator.language.split("-")[0].toLowerCase()}}async getLanguageTag(){return{value:navigator.language}}parseUa(e){const i={},r=e.indexOf("(")+1;let a=e.indexOf(") AppleWebKit");e.indexOf(") Gecko")!==-1&&(a=e.indexOf(") Gecko"));const s=e.substring(r,a);if(e.indexOf("Android")!==-1){const t=s.replace("; wv","").split("; ").pop();t&&(i.model=t.split(" Build")[0]),i.osVersion=s.split("; ")[1]}else if(i.model=s.split("; ")[0],typeof navigator<"u"&&navigator.oscpu)i.osVersion=navigator.oscpu;else if(e.indexOf("Windows")!==-1)i.osVersion=s;else{const t=s.split("; ").pop();if(t){const n=t.replace(" like Mac OS X","").split(" ");i.osVersion=n[n.length-1].replace(/_/g,".")}}/android/i.test(e)?i.operatingSystem="android":/iPad|iPhone|iPod/.test(e)&&!window.MSStream?i.operatingSystem="ios":/Win/.test(e)?i.operatingSystem="windows":/Mac/i.test(e)?i.operatingSystem="mac":i.operatingSystem="unknown";const l=!!window.ApplePaySession,x=!!window.chrome,p=/Firefox/.test(e),d=/Edg/.test(e),g=/FxiOS/.test(e),c=/CriOS/.test(e),f=/EdgiOS/.test(e);if(l||x&&!d||g||c||f){let t;g?t="FxiOS":c?t="CriOS":f?t="EdgiOS":l?t="Version":t="Chrome";const n=e.split(" ");for(const o of n)if(o.includes(t)){const v=o.split("/")[1];i.browserVersion=v}}else if(p||d){const o=e.split("").reverse().join("").split("/")[0].split("").reverse().join("");i.browserVersion=o}return i}getUid(){if(typeof window<"u"&&window.localStorage){let e=window.localStorage.getItem("_capuid");return e||(e=this.uuid4(),window.localStorage.setItem("_capuid",e),e)}return this.uuid4()}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const i=Math.random()*16|0;return(e==="x"?i:i&3|8).toString(16)})}}export{y as DeviceWeb};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as t}from"./index-DXEfDC45.js";class s extends t{constructor(){super(),this.handleVisibilityChange=()=>{const e={isActive:document.hidden!==!0};this.notifyListeners("appStateChange",e),document.hidden?this.notifyListeners("pause",null):this.notifyListeners("resume",null)},document.addEventListener("visibilitychange",this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented("Not implemented on web.")}async getInfo(){throw this.unimplemented("Not implemented on web.")}async getLaunchUrl(){return{url:""}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented("Not implemented on web.")}}export{s as AppWeb};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as i}from"./index-DXEfDC45.js";class u extends i{async initialize(e){const n={version:"v17.0"};return await this.loadScript(e.locale),FB.init(Object.assign(Object.assign({},n),e))}loadScript(e){if(typeof document>"u")return Promise.reject("document global not found");const n="fb";if(document.getElementById(n))return Promise.resolve();const r=document.getElementsByTagName("head")[0],s=document.createElement("script");return new Promise(o=>{s.onload=()=>o(),s.defer=!0,s.async=!0,s.id=n,s.src=`https://connect.facebook.net/${e??"en_US"}/sdk.js`,r.appendChild(s)})}async login(e){return new Promise((n,t)=>{FB.login(r=>{r.status==="connected"?n({accessToken:{token:r.authResponse.accessToken}}):t({accessToken:{token:null}})},{scope:e.permissions.join(",")})})}async logout(){return new Promise(e=>FB.logout(()=>e()))}async reauthorize(){return new Promise(e=>FB.reauthorize(n=>e(n)))}async getCurrentAccessToken(){return new Promise((e,n)=>{FB.getLoginStatus(t=>{if(t.status==="connected"){const r={accessToken:{applicationId:void 0,declinedPermissions:[],expires:void 0,isExpired:void 0,lastRefresh:void 0,permissions:[],token:t.authResponse.accessToken,userId:t.authResponse.userID}};e(r)}else n({accessToken:{token:null}})})})}async getProfile(e){const n=e.fields.join(",");return new Promise((t,r)=>{FB.api("/me",{fields:n},s=>{if(s.error){r(s.error.message);return}t(s)})})}async logEvent(){return Promise.resolve()}async setAutoLogAppEventsEnabled(){return Promise.resolve()}async setAdvertiserTrackingEnabled(){return Promise.resolve()}async setAdvertiserIDCollectionEnabled(){return Promise.resolve()}}export{u as FacebookLoginWeb};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as c}from"./index-DXEfDC45.js";class g extends c{constructor(){super()}loadScript(){if(typeof document>"u")return;const e="gapi";if(document==null?void 0:document.getElementById(e))return;const n=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.defer=!0,t.async=!0,t.id=e,t.onload=this.platformJsLoaded.bind(this),t.src="https://apis.google.com/js/platform.js",n.appendChild(t)}initialize(e={clientId:"",scopes:[],grantOfflineAccess:!1}){var s,n;if(typeof window>"u")return;const t=(s=document.getElementsByName("google-signin-client_id")[0])===null||s===void 0?void 0:s.content,i=e.clientId||t||"";i||console.warn("GoogleAuthPlugin - clientId is empty"),this.options={clientId:i,grantOfflineAccess:(n=e.grantOfflineAccess)!==null&&n!==void 0?n:!1,scopes:e.scopes||[]},this.gapiLoaded=new Promise(o=>{window.gapiResolve=o,this.loadScript()}),this.addUserChangeListener()}platformJsLoaded(){gapi.load("auth2",()=>{const e={client_id:this.options.clientId,plugin_name:"CodetrixStudioCapacitorGoogleAuth"};this.options.scopes.length&&(e.scope=this.options.scopes.join(" ")),gapi.auth2.init(e),window.gapiResolve()})}async signIn(){return new Promise(async(e,s)=>{var n;try{let t;const i=(n=this.options.grantOfflineAccess)!==null&&n!==void 0?n:!1;i?t=(await gapi.auth2.getAuthInstance().grantOfflineAccess()).code:await gapi.auth2.getAuthInstance().signIn();const o=gapi.auth2.getAuthInstance().currentUser.get();i&&await o.reloadAuthResponse();const a=this.getUserFrom(o);a.serverAuthCode=t,e(a)}catch(t){s(t)}})}async refresh(){const e=await gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse();return{accessToken:e.access_token,idToken:e.id_token,refreshToken:""}}async signOut(){return gapi.auth2.getAuthInstance().signOut()}async addUserChangeListener(){await this.gapiLoaded,gapi.auth2.getAuthInstance().currentUser.listen(e=>{this.notifyListeners("userChange",e.isSignedIn()?this.getUserFrom(e):null)})}getUserFrom(e){const s={},n=e.getBasicProfile();s.email=n.getEmail(),s.familyName=n.getFamilyName(),s.givenName=n.getGivenName(),s.id=n.getId(),s.imageUrl=n.getImageUrl(),s.name=n.getName();const t=e.getAuthResponse(!0);return s.authentication={accessToken:t.access_token,idToken:t.id_token,refreshToken:""},s}}export{g as GoogleAuthWeb};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as o}from"./index-DXEfDC45.js";class e extends o{constructor(){super(),this._lastWindow=null}async open(s){this._lastWindow=window.open(s.url,s.windowName||"_blank")}async close(){return new Promise((s,n)=>{this._lastWindow!=null?(this._lastWindow.close(),this._lastWindow=null,s()):n("No active window to close!")})}}const i=new e;export{i as Browser,e as BrowserWeb};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as p}from"./index-DXEfDC45.js";class f extends p{constructor(){super(...arguments),this.group="CapacitorStorage"}async configure({group:e}){typeof e=="string"&&(this.group=e)}async get(e){return{value:this.impl.getItem(this.applyPrefix(e.key))}}async set(e){this.impl.setItem(this.applyPrefix(e.key),e.value)}async remove(e){this.impl.removeItem(this.applyPrefix(e.key))}async keys(){return{keys:this.rawKeys().map(t=>t.substring(this.prefix.length))}}async clear(){for(const e of this.rawKeys())this.impl.removeItem(e)}async migrate(){var e;const t=[],s=[],n="_cap_",o=Object.keys(this.impl).filter(i=>i.indexOf(n)===0);for(const i of o){const r=i.substring(n.length),a=(e=this.impl.getItem(i))!==null&&e!==void 0?e:"",{value:l}=await this.get({key:r});typeof l=="string"?s.push(r):(await this.set({key:r,value:a}),t.push(r))}return{migrated:t,existing:s}}async removeOld(){const e="_cap_",t=Object.keys(this.impl).filter(s=>s.indexOf(e)===0);for(const s of t)this.impl.removeItem(s)}get impl(){return window.localStorage}get prefix(){return this.group==="NativeStorage"?"":`${this.group}.`}rawKeys(){return Object.keys(this.impl).filter(e=>e.indexOf(this.prefix)===0)}applyPrefix(e){return this.prefix+e}}export{f as PreferencesWeb};
|
package/dist/index.html
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE HTML>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta name="google-signin-client_id" content="977665455842-5d5ar2comte3muk65oaf4g5jrmcsvu1m.apps.googleusercontent.com">
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
|
|
7
|
-
<meta name="format-detection" content="telephone=no">
|
|
8
|
-
<meta name="msapplication-tap-highlight" content="no">
|
|
9
|
-
<meta name="format-detection" content="telephone=no">
|
|
10
|
-
<link rel="icon" href="/favicon.ico" class="next-head"/>
|
|
11
|
-
<title>Tapni - Share everything with just a tap</title>
|
|
12
|
-
<meta name="description" content="Your new connecting experience. Tapni allows you to share all your socials and contact information in a smart, contactless, and sustainable way. One TAP is all it takes. Keep all your links in one place. Bring your business card to life. Impress anyone you meet. Connecting made effortless with just a simple tap!">
|
|
13
|
-
<!-- Open Graph / Facebook -->
|
|
14
|
-
<meta property="og:type" content="website">
|
|
15
|
-
<meta property="og:title" content="Tapni - Share with just a tap">
|
|
16
|
-
<meta property="og:description" content="Share everything in a smart, contactless,and sustainable way">
|
|
17
|
-
<meta property="og:image" content="https://cdn.tapni.co/images/banner-sticker.png">
|
|
18
|
-
<meta property="og:url" content="https://tapni.com">
|
|
19
|
-
|
|
20
|
-
<!-- Twitter -->
|
|
21
|
-
<meta property="twitter:url" content="https://tapni.com">
|
|
22
|
-
<meta property="twitter:card" content="summary_large_image">
|
|
23
|
-
<meta property="twitter:site" content="@tapni_co">
|
|
24
|
-
<meta property="twitter:title" content="Tapni - Share everything with just a tap">
|
|
25
|
-
<meta property="twitter:description" content="Your new connecting experience. Tapni allows you to share all your socials and contact information in a smart, contactless, and sustainable way. One TAP is all it takes. Keep all your links in one place. Bring your business card to life. Impress anyone you meet. Connecting made effortless with just a simple tap!">
|
|
26
|
-
<meta property="twitter:image" content="https://cdn.tapni.co/images/banner-sticker.png">
|
|
27
|
-
|
|
28
|
-
<link rel="apple-touch-icon" href="/icon.png">
|
|
29
|
-
<link rel="android-touch-icon" href="/icon.png" />
|
|
30
|
-
<script type="module" crossorigin src="/assets/index-DXEfDC45.js"></script>
|
|
31
|
-
<link rel="stylesheet" crossorigin href="/assets/index-CNOQuLc_.css">
|
|
32
|
-
</head>
|
|
33
|
-
<body id="bodyId" class="lazy-scroll no-select">
|
|
34
|
-
<div id="app"></div>
|
|
35
|
-
</body>
|
|
36
|
-
</html>
|