GithubHelp home page GithubHelp logo

auth0-samples / auth0-react-native-sample Goto Github PK

View Code? Open in Web Editor NEW
120.0 28.0 149.0 3.26 MB

Auth0 Integration Samples for React Native

Home Page: https://auth0.com/docs/quickstart/native/react-native

License: MIT License

JavaScript 11.52% Java 42.66% Objective-C 13.72% Ruby 13.53% TypeScript 12.56% Objective-C++ 6.02%
quickstart native dx-sdk-quickstart react-native sample

auth0-react-native-sample's Introduction

Auth0 React Native Sample

This is the sample code for the Auth0 React Native Quickstart using the Auth0 React Native SDK.

Please see the sample applications that demonstrate integrating the Auth0 React Native SDK into your application

What is Auth0?

Auth0 helps you to:

  • Add authentication with multiple sources, either social identity providers such as Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce (amongst others), or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS, or any SAML Identity Provider.
  • Add authentication through more traditional username/password databases.
  • Add support for linking different user accounts with the same user.
  • Support for generating signed JSON Web Tokens to call your APIs and flow the user identity securely.
  • Analytics of how, when, and where users are logging in.
  • Pull data from other sources and add it to the user profile through JavaScript rules.

Create a Free Auth0 Account

  1. Go to Auth0 and click Sign Up.
  2. Use Google, GitHub, or Microsoft Account to login.

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.

auth0-react-native-sample's People

Contributors

adamjmcgrath avatar benlizar avatar cocojoe avatar dependabot[bot] avatar dminkovsky avatar evansims avatar frederikprijck avatar hzalaz avatar jimmyjames avatar joshcanhelp avatar lbalmaceda avatar poovamraj avatar snyk-bot avatar thasianx avatar tonybennett avatar widcket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auth0-react-native-sample's Issues

login issue

I am getting unauthorized error after pressing the login button

Trouble setting up react native sample app

This issue is opened on behalf of the user. The community forum question to this can be found here: https://community.auth0.com/t/trouble-setting-up-react-native-sample-app/25086/2

"I am new to using Auth0 and am trying to integrate Auth0 authentication into a react Native application that I have been building. In order to see how the auth0 authentication flow should work, I decided to downloaded the react-native Auth0 sample app. After following the instructions to set it up I was able to launch the sample app, but when I clicked on the login link in the ios simulator, I got an error in the chrome debugger that said, ‘Error: Missing NativeModule. Please make sure you run `react-native link react-native-auth0’. I tried linking the react-native-auth0, but then got a message saying, “react-native-auth0” is already linked. If anyone can give me some advice on how to solve this problem, I would be grateful."

00-Login-Expo - Support of Social login

Can you extend the 'expo-auth-session' sdk to sync with your social logins? Expo have already built it for Google/Facebook. Implementation available here expo/expo#18270 (comment)

Requirements

  • Should extend the 00-Login-Expo sample in this repo.
  • Should have ability to connect/disconnect social profile to an Auth0 user (currently loggedin/currently registered.)

Back Story

I have been using Auth0 on my prod application (expo managed) since this Jan. I haven't used any of your js sdk/Universal login as all those end up in either showing proxy alert on iOS OR bundling the Auth0 clientId and secrets inside apk/ipa. So I am using your management token and registering/login users from backend. Hence my frontend app makes login api call to backend and backend forwards it to Auth0.

The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".' was thrown

After putting these value in info.plist I'm getting issue in iOS but in case of Android It's working fine.

The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".' was thrown while invoking showUrl on target A0Auth0 with params.

CFBundleURLTypes


CFBundleTypeRole
None
CFBundleURLName
auth0
CFBundleURLSchemes

$(PRODUCT_BUNDLE_IDENTIFIER)


"react": "17.0.2",
"react-native": "0.64.0",

Simulator Screen Shot - iPhone 12 - 2021-04-15 at 13 11 35

Cannot read properties of undefined (reading 'addHelper')

Checklist

  • I have looked into the Readme (Base/Hooks/Expo) and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

Javascript error: Cannot read properties of undefined (reading 'addHelper')

Reproduction

git clone this repo
npm install
pod install (failed)
pod install --repo-update (failed)
pod update Auth0 (success)

pod deintegrate
npm install
pod install (success)

Run in simulator

Additional context

N/A

Sample

Base

Platform

iOS

Platform version(s)

"expo": "^50.0.17", "react-native": "0.72.1", "react-native-auth0": "^3.0.0", ios simulator 17.0

"Oops, something went wrong" screen

I saw 'successful auth' and then redirected to that screen.
I've entered my tokens into auth0-credentilals.js and added 'allowed callback'. Is anything else I need to modify to run this demo successfully?

Unable to build the app on Android due to react-native-gradle-plugin:compileKotlin FAILURE

I keep getting the following error when I've tried cleaning gradle, invalidating caches, updating JAVA_HOME env variable multiple times and making sure everything lines up for other react native projects to run smoothly.

`

Could not connect to kotlin daemon. Using fallback strategy.
/Users/hiftikhar/Documents/GitHub/auth0-react-native-sample/00-Login/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt:137:11: error: this declaration is experimental and its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
buildList {
^

Task :react-native-gradle-plugin:compileKotlin FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-gradle-plugin:compileKotlin'.

Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

`

typescript

When I attempt to follow the hooks sample using Typescript I keep getting an error saying that Auth0Provider cannot be used as a JSX element. Additionally, I get an error saying that auth) does not have an export, when I use "import { Auth0Provider } from 'react-native-auht0';

please advise.

Peer Dependency Conflict

Unable to install dependecies with npm package manager:
Screenshot 2022-07-06 at 15 21 03

UPDATE
Couldn't run the app after npm i --legacy-peer-deps either
Screenshot 2022-07-06 at 15 38 25

example for calling an api

hello

in auth0-spa-js to get a token for a different audience i can use getTokenSilently with my target audience of the api i want to authenticate

is there a way to get a token for different audience silently with that auth0-react-native?

i checked the docs and src but i am not sure how to do that here in auth0-react-native
using webAuth.authorize always opens the webview

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".

When accessing the Auth0 link below issue occurred in xamarin android

xcode ver : 12.5 and SDK ver : 14.5

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".
Native stack trace:
0 CoreFoundation 0x00007fff20422fba __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20193ff5 objc_exception_throw + 48
2 AuthenticationServices 0x00007fff4aae1b15 -[ASWebAuthenticationSession initWithURL:callbackURLScheme:usingEphemeralSession:completionHandler:] + 684
3 BusinessPartnersApp 0x0000000108a9a5d9 xamarin_dyn_objc_msgSend + 217
4 ??? 0x000000011d4a334e 0x0 + 4786369358

access_denied: Unauthorized

I have followed the tutorial given here: https://auth0.com/docs/quickstart/native/react-native

Created a sample app,
After click on button browser opens up with AUTH0, login and signup page of my app,
but after login or signup, I am getting access_denied: Unauthorized on console.

This is the code snippet that is on button click,
auth0 .webAuth .authorize({scope: 'openid profile email'}) .then(credentials => // Successfully authenticated console.log("Logged In") ) .catch(error => console.log("Error -",error)) }
It falls in catch.
image

Can't run 00-Login app in Xcode 14.3 on M2 Mac

After resolving 2 Deployment target issues, including this one, : facebook/react-native#36635

I am faced with the following errors:

Screenshot 2023-05-04 at 2 19 23 PM

00-Login/ios/Auth0Samples/AppDelegate.m:19:36 Too few arguments to function call, expected 2, have 1
00-Login/ios/Auth0Samples/AppDelegate.m:22:77 Too few arguments to function call, expected 4, have 3

A0Auth0 not installed and linked into app

First:

  • Clone this repo from bd128ed (master at time of writing)
  • yarn install
  • #66
  • pod install

Now, I am not seeing the A0Auth0 pod installed and linked into my app.

$ pod install
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.69.0)
Installing FBReactNativeSpec (0.69.0)
Installing RCT-Folly (2021.06.28.00-v2)
Installing RCTRequired (0.69.0)
Installing RCTTypeSafety (0.69.0)
Installing React (0.69.0)
Installing React-Codegen (0.69.0)
Installing React-Core (0.69.0)
Installing React-CoreModules (0.69.0)
Installing React-RCTActionSheet (0.69.0)
Installing React-RCTAnimation (0.69.0)
Installing React-RCTBlob (0.69.0)
Installing React-RCTImage (0.69.0)
Installing React-RCTLinking (0.69.0)
Installing React-RCTNetwork (0.69.0)
Installing React-RCTSettings (0.69.0)
Installing React-RCTText (0.69.0)
Installing React-RCTVibration (0.69.0)
Installing React-bridging (0.69.0)
Installing React-callinvoker (0.69.0)
Installing React-cxxreact (0.69.0)
Installing React-jsi (0.69.0)
Installing React-jsiexecutor (0.69.0)
Installing React-jsinspector (0.69.0)
Installing React-logger (0.69.0)
Installing React-perflogger (0.69.0)
Installing React-runtimeexecutor (0.69.0)
Installing ReactCommon (0.69.0)
Installing Yoga (1.14.0)
Installing boost (1.76.0)
Installing fmt (6.2.1)
Installing glog (0.3.5)
Generating Pods project
^B[/Users/dmitry/dev/auth0-react-native-sample/00-Login/ios/Pods/Target Support Files/Pods-Auth0Samples/Pods-Auth0Samples.release.xcconfig
/Users/dmitry/dev/auth0-react-native-sample/00-Login/ios/Pods/Target Support Files/Pods-Auth0Samples/Pods-Auth0Samples.debug.xcconfig
/Users/dmitry/dev/auth0-react-native-sample/00-Login/ios/Pods/Target Support Files/Pods-Auth0Samples-Auth0SamplesTests/Pods-Auth0Samples-Auth0SamplesTests.release.xcconfig
/Users/dmitry/dev/auth0-react-native-sample/00-Login/ios/Pods/Target Support Files/Pods-Auth0Samples-Auth0SamplesTests/Pods-Auth0Samples-Auth0SamplesTests.debug.xcconfig
Setting REACT_NATIVE build settings
^U
Integrating client project
Pod installation complete! There are 34 dependencies from the Podfile and 33 total pods installed.

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.

and A0Auth0 is not listed in my Podfile.lock. Here is my podfile:

$ cat Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false

target 'Auth0Samples' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => flags[:hermes_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'Auth0SamplesTests' do
    inherit! :complete
    # Pods for testing
  end

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

And here is auth0's podspec:

$ cat ../node_modules/react-native-auth0/ios/A0Auth0.podspec 
require "json"

package = JSON.parse(File.read(File.join(__dir__, "../package.json")))

Pod::Spec.new do |s|
  s.name         = "A0Auth0"
  s.version      = package["version"]
  s.summary      = package["description"]
  s.homepage     = "https://github.com/auth0/react-native-auth0"
  s.license      = "MIT"
  s.license      = { :type => "MIT", :file => "../LICENSE" }
  s.authors      = { "Auth0" => "[email protected]" }
  s.platforms    = { :ios => "9.0" }
  s.source       = { :git => "https://github.com/auth0/react-native-auth0.git", :tag => "v#{s.version}" }

  s.source_files = "*.{h,m,swift}"
  s.requires_arc = true

  s.dependency "React"
end

00-login-expo loading forever and not logging in

Checklist

  • I have looked into the Readme (Base/Hooks/Expo) and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

After following the expo quickstart for auth0 for react native I am having issues:

First it would not stop loading. I had no error or log to give me any insights so I removed the isLoading condition and that did give me more info. The app view loaded correctly but pressing the log in button opened no login page or redirection. Instead the screen displayed 'you are not logged in' and 'cannot read property hasValidAuth0Instance of null'. The console displayed the following log '[TypeError: Cannot read property 'accessToken' of undefined]'. I have not found any help on the docs, forums, or issues of this repo.

Reproduction

I downloaded the sample from auth0 directly and followed the doc that ensued after. I have modified added and saved the logout and callback urls on auth0 and used the package name and bundle id found on app.json. And after having seen the error for the first time I changed the client id in the auth0-configuration file to the one I found on the settings of 'My App' on auth0. Which did not fix the error.

Additional context

I am coding on an intel mac using visual studio code and testing with both the ios simulator and my IPhone

Sample

Expo

Platform

iOS

Platform version(s)

expo 0.7.3

Error: Missing NativeModule. Please make sure you run `react-native link react-native-auth0`

I followed steps from the "Login Quickstart" page. I can see that my Auth0 client is initialized. But when I try to do
Auth0.webAuth ( ...

I am getting the following error:

Error: Missing NativeModule. Please make sure you run react-native link react-native-auth0
at Agent.newTransaction (agent.js:33)
at WebAuth.authorize (index.js:51)
at Object.showLogin (auth0.js:56)
at AppView.componentWillReceiveProps (AppView.ios.js:39)
at AppView.proxiedMethod (createPrototypeProxy.js:44)
at callComponentWillReceiveProps (ReactNativeFiber-dev.js:1639)
at updateClassInstance (ReactNativeFiber-dev.js:1663)
at updateClassComponent (ReactNativeFiber-dev.js:1712)
at beginWork (ReactNativeFiber-dev.js:1833)
at performUnitOfWork (ReactNativeFiber-dev.js:2569)

Can anyone please help me?
I have tried doing "react-native link react-native-auth0".
screen shot 2017-11-05 at 5 27 36 pm

outdated dependencies

(AUTH-4214)
Sample using outdated version of dependencies such as react, react-native, react-native-auth0, etc.

A0Auth0 pod not installed and linked to the sample app.

After clone, yarn install, #66 and pod install, I am not seeing the A0Auth0 pod installed and linked into my app.

$ pod install
$ pod install
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.69.0)
Installing FBReactNativeSpec (0.69.0)
Installing RCT-Folly (2021.06.28.00-v2)
Installing RCTRequired (0.69.0)
Installing RCTTypeSafety (0.69.0)
Installing React (0.69.0)
Installing React-Codegen (0.69.0)
Installing React-Core (0.69.0)
Installing React-CoreModules (0.69.0)
Installing React-RCTActionSheet (0.69.0)
Installing React-RCTAnimation (0.69.0)
Installing React-RCTBlob (0.69.0)
Installing React-RCTImage (0.69.0)
Installing React-RCTLinking (0.69.0)
Installing React-RCTNetwork (0.69.0)
Installing React-RCTSettings (0.69.0)
Installing React-RCTText (0.69.0)
Installing React-RCTVibration (0.69.0)
Installing React-bridging (0.69.0)
Installing React-callinvoker (0.69.0)
Installing React-cxxreact (0.69.0)
Installing React-jsi (0.69.0)
Installing React-jsiexecutor (0.69.0)
Installing React-jsinspector (0.69.0)
Installing React-logger (0.69.0)
Installing React-perflogger (0.69.0)
Installing React-runtimeexecutor (0.69.0)
Installing ReactCommon (0.69.0)
Installing Yoga (1.14.0)
Installing boost (1.76.0)
Installing fmt (6.2.1)
Installing glog (0.3.5)
Generating Pods project
^B[/Users/dmitry/dev/auth0-react-native-sample/00-Login/ios/Pods/Target Support Files/Pods-Auth0Samples/Pods-Auth0Samples.release.xcconfig
/Users/dmitry/dev/auth0-react-native-sample/00-Login/ios/Pods/Target Support Files/Pods-Auth0Samples/Pods-Auth0Samples.debug.xcconfig
/Users/dmitry/dev/auth0-react-native-sample/00-Login/ios/Pods/Target Support Files/Pods-Auth0Samples-Auth0SamplesTests/Pods-Auth0Samples-Auth0SamplesTests.release.xcconfig
/Users/dmitry/dev/auth0-react-native-sample/00-Login/ios/Pods/Target Support Files/Pods-Auth0Samples-Auth0SamplesTests/Pods-Auth0Samples-Auth0SamplesTests.debug.xcconfig
Setting REACT_NATIVE build settings
^U
Integrating client project
Pod installation complete! There are 34 dependencies from the Podfile and 33 total pods installed.

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.

A0Auth0 is not listed in my Podfile.lock.

When I run the app, it fails on authorize() with "Missing NativeModule".

a typo in the readme

00-LogIn directory

just a minor thing just in case some people may get confused with it.

app/auth0-credentials.js ==> app/auth0-configuraton.js

Facing issues with `Sign in With Apple`

Hi There,

I want to implement Sign in with Apple, similar to Sign in with Google. I've setup the connection and linked it to my app in Auth0 portal.
In code when I'm passing connection as apple it is throwing error, error message:

[server_error: Object argument required.]

Here is my method which I'm calling on clicking the Sign In with Apple Button

 auth0.webAuth
  .authorize({
    audience: config.API_BASE_URL,
    connection:'apple',
    scope: 'openid profile email offline_access',
  })
  .then(async credentials => {
    console.log("Success");
  })
  .catch(error => {
     console.log(error);
   });

Missing support for android TV app using react native

I am working on android TV app using react native. I have integrated the Auth0 in this app using react-native-auth0 as mentioned in the documentation of Auth0. I have two issues here.

  1. After configuring the dashboard and the app as per documentation I am getting the error. it says "access_denied: unable to access client_id from undefined".
  2. In this sample you have used web based authentication which I think will not be supported on the TV.

can you look in this and guide me please?

`getCredentials` return undefined.

Hey guys, first of all awesome package, good job! I'm facing issue with android that do not exists on iOS, getCredentials returns undefined. I'm following expo tutorial step by step and everything seems fine, google form pops up, i'm able to enter credentials but then
image
accessToken is undefined. Callback and Logout urls are set, i have set my domain in app.json also passed to Auth0Provider config together with clientId but for some reason this return undefined after undefined

Some changes are needed to run the Hooks sample

Checklist

  • I have looked into the Readme (Base/Hooks/Expo) and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

I got errors and fix those
Upgrading React Native version may solve this issue fundamentally

Reproduction

  1. git clone
  2. yarn
  3. cd ios && pod install && cd -
  4. yarn run ios
  5. got errors
image

Additional context

Editing the generated CocoaPods project with the following comment solved errors

facebook/react-native#34106 (comment)

Sample

Hooks

Platform

iOS

Platform version(s)

16.4

No readme.md

(AUTH-4175)
Sample doesn't contain readme.md file

error: Error: Unable to resolve module ./auth0-configuration from auth0-react-native-sample/00-Login-Hooks/app/App.js:

I am getting the following error when trying to spin up the Android up while the metro bundler server is running

`None of these files exist:

  • app/auth0-configuration(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  • app/auth0-configuration/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
    10 | import {Alert, Button, StyleSheet, Text, View} from 'react-native';
    11 | import {useAuth0, Auth0Provider} from 'react-native-auth0';

12 | import config from './auth0-configuration';
| ^
13 |
`

Unable to login using Custom Domain

Description

I’m trying to login into my native app and this is what I’m getting: “You should not be hitting this endpoint. Make sure to use the code snippets shown in the tutorial or contact [email protected] for help”

At the very beggining I was using the application domain and it was working, but we already have a custom domain (we need to have it), so after I changed the domain in my native app I started getting that error.

Current configuration:

const auth0 = new Auth0({
  domain: customDomain,
  clientId: clientID,
  configurationBaseUrl: 'https://cdn.auth0.com',
  overrides: {
    __tenant: 'dev-aura',
    __token_issuer: 'https://${customDomain}'
  }
});

The type initializer for 'System.Text.Json.JsonSerializer' threw an exception

Not sure what went wrong.

XCode 13.2
nuget Auth0.OidcClient.iOS - 3.3.4
.net core 6

I'm using the FormsSample, just changed the values to my own auth0 account. When I click on the Login button I get this exception

Error loading discovery document: Error connecting to https://projectport.eu.auth0.com/.well-known/jwks.json. 
The type initializer for 'System.Text.Json.JsonSerializer' threw an exception..

Any ideas?

Expo Router 2 example

Checklist

  • I have looked into the Readme (Base/Hooks/Expo) and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

I'm having issues grasping how the callback routing works with Auth0 and the new expo file based router (expo router 2) which is now stable and merged to expo.

Describe the ideal solution

Would love a working example of integrating new 3.0 auth0 with expo router 2.

Alternatives and current workarounds

No response

Additional context

No response

malformed /uxxxx encoding

Build failed with an exception in /android/app/build.gradle

I downloaded from the Auth0 > Clients > QuickStart page, ran npm install, then react-native run-android without changing any of the code.
Seems to be a problem in the build.gradle file.
Anybody else having this issue?
screenshot

Add a test for App.js

Is it possible to add a test for App.js? I already know Okta's React Native SDK and I'm trying to learn Auth0's.

Okta has a sample with a test for its Auth component. It would be useful if this example contained something similar.

pod install errors out

I'm on MacOS and my pod install errors out when running.

Steps to reproduce

  1. Clone the repo
  2. cd auth0-react-native-sample/00-Login
  3. Run yarn install
  4. cd ios
  5. pod install

I get the following output:

ios % pod install
Auto-linking React Native module for target `Auth0Samples`: A0Auth0
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing A0Auth0 (2.12.0)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.66.4)
Installing FBReactNativeSpec (0.66.4)
Installing RCT-Folly (2021.06.28.00-v2)
Installing RCTRequired (0.66.4)
Installing RCTTypeSafety (0.66.4)
Installing React (0.66.4)
Installing React-Core (0.66.4)
Installing React-CoreModules (0.66.4)
Installing React-RCTActionSheet (0.66.4)
Installing React-RCTAnimation (0.66.4)
Installing React-RCTBlob (0.66.4)
Installing React-RCTImage (0.66.4)
Installing React-RCTLinking (0.66.4)
Installing React-RCTNetwork (0.66.4)
Installing React-RCTSettings (0.66.4)
Installing React-RCTText (0.66.4)
Installing React-RCTVibration (0.66.4)
Installing React-callinvoker (0.66.4)
Installing React-cxxreact (0.66.4)
Installing React-jsi (0.66.4)
Installing React-jsiexecutor (0.66.4)
Installing React-jsinspector (0.66.4)
Installing React-logger (0.66.4)
Installing React-perflogger (0.66.4)
Installing React-runtimeexecutor (0.66.4)
Installing ReactCommon (0.66.4)
Installing Yoga (1.14.0)
Installing boost (1.76.0)
Installing fmt (6.2.1)
Installing glog (0.3.5)
[!] /bin/bash -c 
set -e
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -e

PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"

if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
    # Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
    # it's better to rely on platform name as fallback because architecture differs between simulator and device

    if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
        CURRENT_ARCH="x86_64"
    else
        CURRENT_ARCH="arm64"
    fi
fi

export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"

# Remove automake symlink if it exists
if [ -h "test-driver" ]; then
    rm test-driver
fi

./configure --host arm-apple-darwin

cat << EOF >> src/config.h
/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
#include <Availability.h>
#endif

/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
EOF

# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"

checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -isysroot 
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Users/ryanwells/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-53372/missing: Unknown `--is-lightweight' option
Try `/Users/ryanwells/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-53372/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/ryanwells/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-53372':
configure: error: C compiler cannot create executables
See `config.log' for more details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.