Method to sign in with same apple id and password in Mac and iPhone ,
A message will appear in iPhone your Apple ID is being used to sign in to a Mac book near …location . Two options will be shown allow , do not allow so click on allow .
An apple verification code will appear on iPhone , enter this verification code on your Mac book , click on continue .
In your Mac it will prompt to enter admin password , so enter it and click on ok , the circle will rotate in Apple ID field , wait for a while a window will appear the boxes for use iCloud for your documents and data and use find my Mac boxes are checked by default so click on next and click on allow .
Both iphone and Mac are signed in with same Apple ID and password , the approval is completed .