Configure iOS App for Apple Sign in with MongoDB Realm Sync - ios

I am trying to implement Sign in with Apple for my IOS app using realm sync. I am using the sign in to authenticate the user into realm. The thing I do not understand is that I am following these steps from the mongodb setup Apple ID signin:
In Step 2 on creating a services ID for the app in dev portal of apple. We must activate the Sign in with Apple service within the service identifier:
In order to do this we have to provide domains and return URLs? This is all done to create a JWT to put into realm for when activating the apple signing method on realm's side. I am confused by this - isn’t this only for web apps? Do I have to setup a web service on a cloud for this part? I see numerous tutorials on implementing Apple Sign In with Firebase and that's not required.
I genuinely don’t understand what I am supposed to do here. After reading Apple's docs, it shows that you have to do these steps if you are signing in through Apple on a different platform (we are signing in from iOS).
I tried finding tutorials or video examples of people implementing this on their realm database with iOS and I could not find any. I also tried to skip the step of creating a service ID and use the app ID in the script to create the JWT but it ends up being invalid.

Related

Push key is no longer valid on the Apple Developer Portal

I am trying to create custom expo client. When it comes to chosing a way to generate push keys, two options are shown:
Provide my own key
Let expo handle the process
If I choose Provide my own key option (that I get from my expo developer page on the expo website), I get an error saying that:
✖ This Push Key is no longer valid on the Apple Developer Portal
If I choose to Let expo handle the process, it says that:
You can have only two Apple Keys generated on your Apple Developer
account. Please revoke the old ones or reuse existing from your other
apps. Please remember that Apple Keys are not application specific!
When I log into my developer account and look at two of my keys, they are indeed different from the one that is shown on my expo page - their IDs are different. Seems like existing authentication key that is shown on expo is invalid for some reason.
If my current APN authentication key is invalid, then how do notifications in my app still work? And how should I build my custom expo client without breaking my existing, published app?

"The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console"

I have linked my project in the Developer Console and I have looked up various sources to find a solution to this problem. What I am actually trying to do is use the inappproducts REST resource to fetch all my products from Play Console using the get() method. A lot of suggestions that I read was to add a new in-app product which I tried doing but the error still persists after adding new products, editing existing products, adding new subscriptions, etc. I can also see that the Google Play Developer API has been enabled for this project as well. I have also created credentials for both oauth and service account. I have been trying to call this API from the OAuth Playground using my Developers account and since I am the owner of this account, I believe it should work. What should I do?

Deleted oAuth client ID by mistake, how to re-enable IAP

I was playing around with IAP and somehow deleted its oAuth Client ID (IAP-App-Engine-app) which it created during IAP setup for App Engine.
Now, I am not able to use IAP. It is giving following error while enabling IAP on App Engine:
Failed to change IAP state on App Engine app.
Is there a way I can use IAP again on my App Engine by somehow recreating its oAuth Client ID?
sorry you're running into this. It's a known bug, you can read a bit more here. Cloud Console will leave the client ID alone if you already have one configured in your App Engine app's IAP settings. The problem is that the Console isn't checking that the client ID still exists. You can see the workaround at that link: use the App Engine admin API to reset the IAP settings, and then you can turn IAP on in the Console and it will create a new client ID for you.
--Matthew, Google Cloud IAP engineering

Swift 2 OAuth2 LinkedIn connection

I'm gonna make an native iOS app with Swift 2 and Xcode 7. The users should login using LinkedIn and OAuth 2 but I'm wondering how I should begin to set this up. I don't have many experience with OAuth 2.
Is there a good tutorial or a sample app? I saw the Ray Wenderlich post but that comes with an existing project. I want to build an app with LinkedIn login from scratch.
EDIT
I want to use the LinkedIn login to get the user's connections and send them notifications. I was researching this and I found some pages that said that connections can't be retrieved from the new LinkedIn API, is this true? It is not possible to get someone's connections from LinkedIn in a native iOS applications?
You should start with LinkedIn guide for LinkedIn and OAuth 2 .
But still if you need a sample for Authentication with OAuth 2 here it is .
For your second question related to the connection yes Linked have made changes but the API is still available but for the partners .
If you are an existing LinkedIn partner, these changes will not impact your existing partnership or the associated APIs that your partnership allows you to access.
If you are experiencing issues as a result of the May 12th changes, please reach out to your LinkedIn Business Development representative immediately.
For further details you can see Developer Program Transition Guide.
Check out this repo, I did this swift pre-2.0 but it shows you the basic algorithm. You can do it the with your secret hard coded or fetch it from the server. The key is getting the oath header just right which is a huge pain
https://github.com/GregPrice24/SwiftStream
Check this out: https://github.com/jeyben/IOSLinkedInAPI
I used this repo and successfully implement LinkedIn integration in my App. It is in Objective-C but you can use Cocoapods and import them as Frameworks and use in swift2 with no trouble.
Note: As of the 12´ May 2015 LinkedIn applied restrictions to API usage for all non partners: See: https://developer.linkedin.com/blog/posts/2015/developer-program-changes
So you can only get the basicprofile at the beginning, but you can apply for the partner program to get those extra information such as connections here: https://developer.linkedin.com/partner-programs

IOS Twitter and Facebook login approaches and security

I started a few weeks ago to develop my first IOS app and it requires Twitter and Facebook Login.
I am very surprised about the different approaches that both platforms take in terms of security/authentication.
Facebook uses the IOS Bundle ID approach, which seems great, since every Bundle ID is unique and you cannot publish an app Bundle ID in behalf of another user, so is pretty easy for Facebook to figure out if your are who you say you are.
Twitter uses his traditional Key/Secret pair that uses in Web/REST applications in IOS as well, while it works for the Web because you don't need to expose those keys to the Client, that is not the case for IOS applications.
According with the official documentation
"To initialize the Twitter Kit with your app’s credentials, pass them
to startWithConsumerKey:consumerSecret:"
"Calling startWithConsumerKey:consumerSecret: will override any keys
which were automatically configured. Automatically configured keys
live in your app’s Info.plist under the key"
My understanding is that even if I use my keys, or I use the keys generated by Fabric, those will be exposed on the plist which is a non-secure method to store private keys.
I am sure I am missing something here, please clarify me how it works.

Resources