{"id":18665118,"url":"https://github.com/leapwallet/leap-near-sdk-react-native-example","last_synced_at":"2025-07-17T21:33:12.490Z","repository":{"id":71022200,"uuid":"586747162","full_name":"leapwallet/leap-near-sdk-react-native-example","owner":"leapwallet","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-22T04:11:35.000Z","size":505,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-18T05:31:57.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leapwallet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-09T06:03:11.000Z","updated_at":"2023-01-09T06:04:47.000Z","dependencies_parsed_at":"2023-06-05T10:00:38.997Z","dependency_job_id":null,"html_url":"https://github.com/leapwallet/leap-near-sdk-react-native-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leapwallet/leap-near-sdk-react-native-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leapwallet%2Fleap-near-sdk-react-native-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leapwallet%2Fleap-near-sdk-react-native-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leapwallet%2Fleap-near-sdk-react-native-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leapwallet%2Fleap-near-sdk-react-native-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leapwallet","download_url":"https://codeload.github.com/leapwallet/leap-near-sdk-react-native-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leapwallet%2Fleap-near-sdk-react-native-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265663003,"owners_count":23807463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T08:26:22.300Z","updated_at":"2025-07-17T21:33:12.447Z","avatar_url":"https://github.com/leapwallet.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# leap-near-sdk-react-native-example\n\nThe above example works for the webapp built using `leap-near-sdk` version 1.1.0 or above\n\nHere, is the sample snippet needs to be used in your webapp to support the mobile.\n\n```ts\n\n  const setLeapRedirectURL = () =\u003e {\n    const params = window.location.search.substr(1).split('\u0026');\n    params.forEach((param) =\u003e {\n      if(param.split(\"=\")[0] === 'leapRedirectURL') {\n        localStorage.setItem('leapRedirectURL', param.split(\"=\")[1])\n      }  \n    })\n  }\n\n  const autoLogin = async () =\u003e {\n    setLeapRedirectURL();\n    const sdk = await LeapNearSdk.init({ \n      auth_service: 'web3auth',\n      authConfig: { appName: 'Leap near board',  theme: 'dark', isRedirect: true},\n      networkId: 'testnet',\n    })\n    const token = await sdk.auth?.getUserToken();\n    if(token) {\n      await sdk.auth?.connectWithToken(token);\n      const signedData =  await sdk?.auth?.getUser();\n      console.log(signedData?.address);\n      const redirectURL = localStorage.getItem('leapRedirectURL') || 'leap-near-react-native://';\n      (window as Window).location = `${redirectURL}?LeapNearAddress=${signedData?.address}`;\n    }\n    else {\n      await sdk?.auth?.mobileLogin()\n    }\n  }\n\nautoLogin();\n\n```\n\n\n\nhttps://user-images.githubusercontent.com/110881421/211249655-5379f909-47c9-42dd-9216-359c4abc46ec.mov\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleapwallet%2Fleap-near-sdk-react-native-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleapwallet%2Fleap-near-sdk-react-native-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleapwallet%2Fleap-near-sdk-react-native-example/lists"}