This post is part of the Power of PushAuth™ blog series. The first post of the series was a comprehensive guide to push authentication. The next three posts of the series comprise an end-to-end sample implementation of PushAuth in a simple user login flow. The tutorial breakdown is as follows:
The tutorial in this post builds on the web server from the first tutorial. With your web server set up and running, you now need a mobile app to receive and respond to push notifications. This post will help you build the iOS mobile app to do so; then, you will be able to leverage the power of PushAuth for login requests!
To follow this tutorial, you will need:
The pushauth-sample-app-ios GitHub repository contains the sample iOS mobile app code for this project. First, clone the repository to your local machine and open the PushAuthSample.xcworkspace file in Xcode.
Step 2: Setting Up and Running the Project
After following these six steps, your settings should closely resemble the screenshot above from Xcode. Once everything is set up correctly and with your phone still connected to your computer, run the project (Product > Run or Command-R). This screen will show up on your phone:
This step requires you to an Apple Developer Program Role with adequate permissions. The role-permissions are listed here.
Navigate to the Identifiers tab on the Certificates, Identifiers & Profiles page of the Apple Developer site. You’ll need to add a new identifier that matches the Bundle Identifier value you set in Xcode in step 6 above. Click the plus symbol next to the title at the top of the page; if you don’t see this symbol, you likely don’t have adequate permissions. Follow these instructions for the subsequent pages:
Now that you have created an identifier for this project, you can create a push notification certificate associated with this identifier.
UnifyID requires the APNs certificate in *.p12 format to send PushAuth requests to the app. This can be done from the same Identifiers page of the Apple Developer site you were on in Step 3.
Now you have successfully created an APNs certificate in *.p12 format! This will be used by UnifyID and needs to be uploaded to your project settings through the dashboard.
Now you have an Apple Bundle Identifier and an APNs push certificate. It’s time to provide your push credentials to UnifyID so that PushAuth can send push notifications to the sample app on your phone. Check out the Developer Portal docs here, or follow the instructions below.
Once the push credentials are successfully uploaded to your project settings, you will see the push credential information displayed:
If you find yourself needing to change the push credentials used for the project, simply click “Edit” and go through the same upload steps with the new credentials.
You now have all the values necessary for configuration! Open the sample app on your phone and tap the gear icon in the top right of the Configuration screen. For the SDK key, enter your UnifyID project’s SDK key value from the Dashboard. The User string should be the same value you used when creating a user in the web server tutorial, e.g., “Morgan.” If these values do not match, you will not be able to respond to push notifications in the login flow successfully.
Once you set those two values, you must allow push notifications for the app; then, the app is ready to receive your PushAuth login requests!
Now you can go through the full login flow by entering your username and password on the login page, respond to the push notification received by this app on your phone, and be successfully logged in to the website.
That’s it! You now have a simple login flow that integrates PushAuth. The next post provides a tutorial for building the Android sample PushAuth mobile app. Stay tuned for the rest of the posts in the series and, as always, please share this post and reach out to us with questions, comments, or suggestions.
To learn about Prove’s identity solutions and how to accelerate revenue while mitigating fraud, schedule a demo today.
Trusted by 1,000+ leading companies to reduce fraud and improve consumer experiences. Contact us today to learn how you can frictionlessly secure your digital consumer journey — from onboarding to ongoing transactions.
Tap the button below to read our latest white-paper on the subject as industry leaders.
Contact us to learn how leading companies are using Prove Pre-Fill to modernize the account creation process by shaving off clicks and keystrokes that kill conversion.
Get in touch to find out how we can help you identify your customers at every stage of their journey and offer them seamless and secure experiences.
Let our expert team guide you through our identity verification and authentication solutions. Select a date and time that works for you.
Find out how we can help you deliver seamless and secure customer experiences that comply with PSD2/SCA. Select a date and time that works for you.
Download Aite-Novarica Group’s full report about Prove Pre-Fill, including a product overview, customer results, and how the product works.
Download the guide now to learn how you can improve security, cut down on fraud, and create the best possible customer experience.