Coder Social home page Coder Social logo

auth0-samples / auth0-cordova-samples Goto Github PK

View Code? Open in Web Editor NEW
10.0 27.0 32.0 3.78 MB

Integrate Auth0 with Cordova apps

License: MIT License

JavaScript 49.85% CSS 7.86% HTML 42.29%
auth0 community-driven open-source html javascript cordova identity security quickstart dx-sdk-quickstart

auth0-cordova-samples's Introduction

Auth0 Cordova Samples

All Contributors

Contributors

Thanks goes to these wonderful people who contribute(d) or maintain(ed) this repo (emoji key):

Conrad Sopala
Conrad Sopala

๐Ÿšง ๐Ÿ‘€
Alexis Luque
Alexis Luque

๐Ÿ’ป
Michael Arias
Michael Arias

๐Ÿ’ป
Mehreen Khan
Mehreen Khan

๐Ÿ’ป
Scott Steinbeck
Scott Steinbeck

๐Ÿ’ป
Luciano Balmaceda
Luciano Balmaceda

๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

Intro

This repo contains samples that demonstrate how to use Auth0 in a Cordova application. To visit specific examples, got to their directories in root folder.

Read the quickstart guide for more detail.

This repo is supported and maintained by Community Developers, not Auth0. For more information about different support levels check https://auth0.com/docs/support/matrix .

Contribute

Feel like contributing to this repo? We're glad to hear that! Before you start contributing please visit our Contributing Guideline.

Here you can also find the PR template to fill once creating a PR. It will automatically appear once you open a pull request.

Issues Reporting

Spotted a bug or any other kind of issue? We're just humans and we're always waiting for constructive feedback! Check our section on how to report issues!

Here you can also find the Issue template to fill once opening a new issue. It will automatically appear once you create an issue.

Repo Community

Feel like PRs and issues are not enough? Want to dive into further discussion about the tool? We created topics for each Auth0 Community repo so that you can join discussion on stack available on our repos. Here it is for this one: auth0-cordova-samples

License

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

What is Auth0?

Auth0 helps you to:

  • Add authentication with multiple authentication sources, either social like

    • Google
    • Facebook
    • Microsoft
    • Linkedin
    • GitHub
    • Twitter
    • Box
    • Salesforce
    • etc.

    or enterprise identity systems like:

    • Windows Azure AD
    • Google Apps
    • Active Directory
    • ADFS
    • 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 create user identity flow securely

  • Analytics of how, when and where users are logging in

  • Pull data from other sources and add it to user profile, through JavaScript rules

Create a free Auth0 account

  • Go to Auth0 website
  • Hit the SIGN UP button in the upper-right corner

auth0-cordova-samples's People

Contributors

aaguiarz avatar ajmeese7 avatar albertoperdomo avatar alexisluque avatar allcontributors[bot] avatar caseydierking avatar chenkie avatar damieng avatar darkyen avatar davidpatrick avatar dependabot[bot] avatar evansims avatar iannyanes avatar jerdog avatar konradsopala avatar lbalmaceda avatar mehreencs87 avatar mikearias3 avatar ntotten avatar scottsteinbeck avatar snyk-bot avatar vicsant94 avatar vikasjayaram avatar widcket avatar

Stargazers

 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

auth0-cordova-samples's Issues

auth0cordova does not redirect back to app after login when using WKWebView

#8 Description

After updating cordova project to use WKWebView instead of UIWebView (to avoid app store rejection by apple, see https://developer.apple.com/documentation/uikit/uiwebview), auth0cordova does not redirect back to app after login.

Expected behaviour

User should be re-directed back to app after login (i.e safari view controller should close).

Actual behaviour

Instead, login page stays open and the login flow is restarted.

Steps to reproduce the problem

  1. Update cordova-ios to 5.1.1
  2. add cordova-plugin-wkwebview-engine to project
  3. update config.xml to use so that the app removes any use of uiWebView, which will be rejected by apple app store.
  4. Try the login
  5. notice the auth0cordova redirect back to the app does not work and you remain on the login page in the safari view controller

Language / Framework Versions

  1. Cordova ios 5.1.1
  2. WKWebView

Control does not return to redirect_uri when using Apple Sign in

Issue Report

When using this plugin with "Sign in With Apple" on an iPhone without biometrics or with a user that is not the primary user of the iPhone, panel does not redirect after signing in (ends up at a blank panel) making this plugin not function properly on the iPhone simulator and in some use cases on real iPhone devices when a user selects to sign in with a different user than the iPhone user.

I believe this bug is either with Auth0 responses to the /login/callback redirect or a defect in the SFSafariViewController itself.

The behavior requires use of the iOS simulator or an iPhone, an Apple developers account, Auth0 tenant with Apple sign in configured appropriately, and an Application configured in Auth0 with access to the Apple sign in functionality.

I will provide more detailed information.

Unknown URL schema

The example doesn't work for me. I'm getting the following error after logging in with Google oauth:

media-20170826

Sample hangs on login and new sign-up

I downloaded the project, changed the settings to match my account, and launch the iOS simulator. App appears correctly and I was able to fill out a new user sign-up. but on submit the app hangs. It must have worked though because I did receive an email. So I shut down the app and started again, and tried to login. The app shows the email of the last login and when I click it the app hangs again. However, on the Auth0 dashboard for my account I see a successful login. Seems like a problem with redirect back to the native app. The xcode log for the simulator shows:

2018-08-22 08:28:18.999675-0400 Auth0 Example[8052:85075] Finished load of: file:///Users/user144153/Library/Developer/CoreSimulator/Devices/22D61218-4545-4AD9-A227-B279FAA11A36/data/Containers/Bundle/Application/70AF2BF1-BCA2-42FB-A870-7D0CFB6A29CC/Auth0%20Example.app/www/index.html
2018-08-22 08:31:32.414319-0400 Auth0 Example[8052:85075] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/user144153/Library/Developer/CoreSimulator/Devices/22D61218-4545-4AD9-A227-B279FAA11A36/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-08-22 08:31:32.414797-0400 Auth0 Example[8052:85075] [MC] Reading from private effective user settings.
2018-08-22 08:31:33.465856-0400 Auth0 Example[8052:85075] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2018-08-22 08:31:41.194758-0400 Auth0 Example[8052:93757] CredStore - performQuery - Error copying matching creds.  Error=-25300, query={
    class = inet;
    "m_Limit" = "m_LimitAll";
    ptcl = htps;
    "r_Attributes" = 1;
    sdmn = Users;
    srvr = "mycustomaccountname.auth0.com";
    sync = syna;
}
2018-08-22 08:31:41.196190-0400 Auth0 Example[8052:85075] CredStore - performQuery - Error copying matching creds.  Error=-25300, query={
    class = inet;
    "m_Limit" = "m_LimitAll";
    ptcl = htps;
    "r_Attributes" = 1;
    sdmn = Users;
    srvr = "mycustomaccountname.auth0.com";
    sync = syna;
}

index.js not found

Tried running this login sample on cordova android but it says index.js not found.

Then I manually configured the index.js path.. then the error was require is not a function.

Hey there our community developer! ๐Ÿ‘‹ We've got improvements for you! ๐Ÿ”ง

Hey there our Auth0 Community OSS Collaborators!

๐Ÿ‘‹ Long time no see!

As you may have seen some time ago, we communicated the fact that we are gradually working on improving your developer experience inside any repo in this org!

If you go to the readme file of this repository, in the first section you can see a note that this repo is supported and maintained by Community Developers, not Auth0. Despite the fact that we have limited bandwidth inside Auth0 Community Team and are not able to effectively review issues and PRs you submit, we want to improve your experience here one step at a time! That's why you should keep reading!

๐Ÿš€ Auth0 Community Job Offers

If you feel like joining us on a mission to make other developers contributions here more comfortable, here are the links you should visit!

๐Ÿ› ๏ธ Auth0 Community GitHub org - improvements

We're aiming at your successful developer experience in the long term that's why we introduced a few improvements in the meantime and are looking forward to make even more impact!

  • We created a getting-started repo so that you can answer any of your questions before contributing to our community OSS repos!
  • We added Code of Conduct so that everyone can collaborate in a peaceful and effective way!
  • Wondering how to contribute to our repositories?! Got you covered! We added a Contribution Guideline to easily get you started with your commits and PRs!
  • Additionally we added License files to every repo!

Think it's all?! Nah! We ain't stoppin here! โœจ

  • We introduced issues and PRs labels so you can add them to your contributions and other community developers can easily track and choose which ones they would like to help with!
  • The last thing we want to let you know about are Auth0 Community Project Boards. Using them we aim at providing better searchability for people with certain language experience looking to solve stuff in their language of choice and not looking for specific PRs / issues!

โค๏ธ Feedback

Let us know what you think! We're super stoked for your feedback! You can share it here or email us at [email protected]. We know there's a long way ahead of us to make this environment friendly and sustainable but we strongly believe that getting aboard together will let us reach the final destination!

Sample not working - leads to white blank screen (Android)

Description

Followed basic Auth0 sample app instructions (shown below) and it leads to a blank screen.

Expected behaviour

I would expect after following the auth0 instructions that I should have a basic cordova app which allows for login into my auth0 application.

Actual behaviour

Emulator stuck on white screen.

Steps to reproduce the problem

Followed these exact instructions...

image

Language / Framework Versions

Ran npm install -g such that most recent versions of NPM and Cordova were used.

Testing environment

  1. Windows 10
    image
  2. Android emulator running Android API Level 24 (Android 7.0) on a Pixel 2

Screenshots

image

Sample doesn't appear to work

I've followed the instructions for downloading the pre-configured sample as described here: https://auth0.com/docs/quickstart/native/cordova/01-login

I've deployed to the ios simulator iPhone-X, 11.
I needed to install the latest ios sim options, else get no simulator.
Running it works up until the point where it should redirect.
It doesn't redirect and I get the following error:

[Log] Error: Response state does not match expected state (index.js, line 7)
(anonymous function) โ€” index.js:142
onRedirectUri โ€” session.js:18
onRedirectUri โ€” index.js:179
e โ€” index.js:9
(anonymous function) โ€” index.html:1:109
subscribe โ€” cordova.js:730
addEventListener โ€” cordova.js:133
Global Code โ€” index.html:1

outdated dependencies

(AUTH-4231)
Sample uses outdated version of @auth0/cordova, auth0-js and other dependencies.

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.